Task #5933
closed
Printing test generation statistics
Added by Alexander Kamkin over 9 years ago.
Updated over 9 years ago.
Assignee:
Andrei Tatarnikov
Published in build:
150529
Description
See the MMU test generator for details.
@Override
public void onEnd(final int testProgramNumber, final int testCaseNumber) {
endTime = new Date();
long time = endTime.getTime() - startTime.getTime();
long useconds = time % 1000;
long seconds = (time /= 1000) % 60;
long minutes = (time /= 60) % 60;
long hours = time / 60;
final StringBuilder builder = new StringBuilder();
if (hours != 0) {
builder.append(String.format("%d hours ", hours));
}
if (hours != 0 || minutes != 0) {
builder.append(String.format("%d minutes ", minutes));
}
builder.append(String.format("%d.%03d seconds ", seconds, useconds));
System.out.println();
System.out.format("Generation time: %s%n", builder.toString());
System.out.format("Generation speed: %d instructions/second%n",
(1000 * (long) instructionCount) / (endTime.getTime() - startTime.getTime()));
System.out.format("Programs/stimuli/instructions: %d/%d/%d%n",
(testProgramNumber - initialTestProgramNumber) + 1,
(testCaseNumber - initialTestCaseNumber) + 1,
instructionCount);
}
- Status changed from New to Resolved
- % Done changed from 0 to 100
Besic implementation was added in r3740.
- Status changed from Resolved to Closed
- Published in build set to 150529
Also available in: Atom
PDF