Skip to content

Commit

Permalink
Moved per/run stats to the same line as the normal stats.
Browse files Browse the repository at this point in the history
  • Loading branch information
alt236 committed Jan 30, 2013
1 parent e1781f9 commit 22abb6a
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/com/martinadamek/jsonandroid/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ public void run() {
final String label = "Runs: ";

int runs = -1;
String perRun;

for (String key: keys) {
result = results.get(key);

Expand All @@ -70,14 +72,15 @@ public void run() {
runs = result.getTestRepeats();
}

perRun = " (" + result.getDuration() / result.getTestRepeats() + "ms/run)";

writeToTextView(
DATA_LINE_PADDING +
StringUtils.padRight(result.getParserName(), minKeyLength) +
": " +
StringUtils.padLeft(String.valueOf(result.getDuration()), minValueLength) +
"ms");

writeToTextView(DATA_LINE_PADDING + StringUtils.padRight(" ", minKeyLength) + " " + (result.getDuration() / result.getTestRepeats()) + "/run");
"ms" +
perRun);
}
}
});
Expand Down

0 comments on commit 22abb6a

Please sign in to comment.