Skip to content

Commit

Permalink
Format correct output
Browse files Browse the repository at this point in the history
  • Loading branch information
npbhoang committed Jun 21, 2021
1 parent bf205f9 commit 22fe98a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
Expand Up @@ -16,6 +16,7 @@ public class Solution {
private static final String METRIC_TEST_TIME = "TestTimeNanos";
// Database scenarios, from 1 to 7. More detail in docs/scenarios.
private static final String METRIC_SCENARIO_PREFIX = "Scenario%d";
private static final String METRIC_SCENARIO_ALL_PREFIX = "ScenarioID";
private static final int scenarios = 7;

public void run(Configuration c) {
Expand Down Expand Up @@ -56,9 +57,11 @@ public void run(Configuration c) {
final long nanosTestSQLEnd = System.nanoTime();
totalTestTime += nanosTestSQLEnd - nanosTestSQLStart;
totalCorrect = totalCorrect && localCorrect;
final String result = localCorrect?"passed":"failed";
printMetric(c, String.format(METRIC_SCENARIO_PREFIX, iScenario), result);
// final String result = localCorrect?"passed":"failed";
// printMetric(c, String.format(METRIC_SCENARIO_PREFIX, iScenario), result);
}
final String result = totalCorrect?"passed":"failed";
printMetric(c, METRIC_SCENARIO_ALL_PREFIX, result);
if (totalCorrect) {
printMetric(c, METRIC_TEST_TIME, totalTestTime);
}
Expand Down
Expand Up @@ -23,6 +23,7 @@ public class Solution {
private static final String METRIC_TEST_TIME = "TestTimeNanos";
// Database scenarios, from 1 to 7. More detail in docs/scenarios.
private static final String METRIC_SCENARIO_PREFIX = "Scenario%d";
private static final String METRIC_SCENARIO_ALL_PREFIX = "ScenarioID";
private static final int scenarios = 7;

public void run(Configuration c) {
Expand Down Expand Up @@ -58,9 +59,11 @@ public void run(Configuration c) {
final long nanosTestSQLEnd = System.nanoTime();
totalTestTime += nanosTestSQLEnd - nanosTestSQLStart;
totalCorrect = totalCorrect && localCorrect;
final String result = localCorrect?"passed":"failed";
printMetric(c, String.format(METRIC_SCENARIO_PREFIX, iScenario), result);
// final String result = localCorrect?"passed":"failed";
// printMetric(c, String.format(METRIC_SCENARIO_PREFIX, iScenario), result);
}
final String result = totalCorrect?"passed":"failed";
printMetric(c, METRIC_SCENARIO_ALL_PREFIX, result);
if (totalCorrect) {
printMetric(c, METRIC_TEST_TIME, totalTestTime);
}
Expand Down

0 comments on commit 22fe98a

Please sign in to comment.