Skip to content
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

Open
wants to merge 22 commits into
base: master
Choose a base branch
from
Open

Duration branch #2

wants to merge 22 commits into from

Conversation

assafsh2
Copy link
Owner

No description provided.

@assafsh2 assafsh2 requested a review from Amit688 September 12, 2017 12:47
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];
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rename to RAW data

Copy link
Collaborator

@Amit688 Amit688 left a 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);
Copy link
Collaborator

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);
/*
Copy link
Collaborator

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,
Copy link
Collaborator

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/ ?

Copy link
Collaborator

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");
Copy link
Collaborator

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 {
Copy link
Collaborator

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 {
Copy link
Collaborator

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)];
Copy link

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants