-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Duration branch #2
base: master
Are you sure you want to change the base?
Conversation
sourceToUpdateDiffTimeArray= new double[num_of_cycles*num_of_updates_per_cycle]; | ||
totalDiffTimeArray= new double[num_of_cycles*num_of_updates_per_cycle]; | ||
|
||
rowDataToSourceDiffTimeCreateArray = new double[num_of_cycles]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename to RAW data
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Our goal is to use this module as is.
double longX = 6.4; | ||
|
||
for(int j = 0 ; j < num_of_updates_per_cycle; j++) { | ||
System.out.println("UPDATE " + j); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change all System.out.println to log4j messages according to the appropriate level
outputToFile.append("NUM_OF_CYCLES").append(seperator).append(num_of_cycles).append(endl); | ||
} | ||
outputToFile.append("INTERVAL").append(seperator).append(interval).append(endl); | ||
/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove comments
|
||
} | ||
|
||
public String createCsvFileDataInColumns(double[] rowDataToSourceDiffTimeCreateArray,double[] sourceToUpdateDiffTimeCreateArray, double[] totalDiffTimeCreateArray, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you try to work with a standard CSV java library?
such as https://commons.apache.org/proper/commons-csv/ ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The main reason to use this kind of libraries is to optimize the read and writing of these files (that we might experience while handling big files)
@@ -17,67 +17,76 @@ | |||
public class Main { | |||
|
|||
public static void main(String[] args) throws InterruptedException, IOException { | |||
|
|||
String kafkaAddress = System.getenv("KAFKA_ADDRESS"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move ENV params extraction into a separate method and replace prints to log4j
|
||
import org.engine.process.performance.ServiceStatus; | ||
import org.engine.process.performance.utils.InnerService; | ||
import org.engine.process.performance.utils.StdStats; | ||
import org.engine.process.performance.utils.InnerService; | ||
|
||
import akka.japi.Pair; | ||
|
||
public class EngingPerformanceMultiPeriods extends InnerService { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change periods to cycles
@@ -48,7 +47,7 @@ | |||
* | |||
*/ | |||
|
|||
public class EnginePerformanceFromBeginning extends InnerService { | |||
public class EnginePerformanceSingle extends InnerService { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change EnginePerformanceSingle to EnginePerformanceSingleMessage and add some comments to explain that this is the initial implementation, just for reference, and we are not using it anymore
sourceToUpdateDiffTimeCreateArray= new double[num_of_cycles]; | ||
totalDiffTimeCreateArray= new double[num_of_cycles]; | ||
|
||
rowDataToSourceDiffTimeUpdateArray = new double[num_of_cycles*(num_of_updates_per_cycle-1)]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm allergic to long variable names. Please use shorter names (about 3 words, unless you really need more).
No description provided.