blob: f3a717e89dc15c955494c2ca13cd114b299d9664 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 1998, 2012 Oracle and/or its affiliates. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
* which accompanies this distribution.
* The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
* and the Eclipse Distribution License is available at
* http://www.eclipse.org/org/documents/edl-v10.php.
*
* Contributors:
* Oracle - initial impl
******************************************************************************/
package example;
import java.io.StringWriter;
/**
* Generic performance result.
*/
public class PerformanceResult {
String testName;
int runRepeats;
int runTime;
double average;
long min;
long max;
double standardDeviation;
public String toString() {
StringWriter writer = new StringWriter();
writer.write(this.testName + " Results");
writer.write("\nRun repeats:" + this.runRepeats);
writer.write("\nRun time:" + this.runTime + "ms");
writer.write("\nAverage result:" + this.average);
writer.write("\nMax result:" + this.max);
writer.write("\nMin result:" + this.min);
writer.write("\n% standard deviation:" + this.standardDeviation);
return writer.toString();
}
}