Whoops, the benchmarks are in microseconds, not milliseconds.

git-svn-id: https://zxing.googlecode.com/svn/trunk@660 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
dswitkin 2008-11-01 00:40:07 +00:00
parent 5a5987df88
commit b3b945efcc

View file

@ -35,8 +35,8 @@ public class BenchmarkItem {
mFormat = null;
}
public void addResult(int milliseconds) {
mTimes[mPosition] = milliseconds;
public void addResult(int microseconds) {
mTimes[mPosition] = microseconds;
mPosition++;
}
@ -55,19 +55,19 @@ public class BenchmarkItem {
result.append(mPath);
result.append(" (");
result.append(getAverageTime());
result.append(" ms average)\n ");
int size = mTimes.length;
for (int x = 0; x < size; x++) {
result.append(mTimes[x]);
result.append(" ");
}
result.append(" us average)");
// int size = mTimes.length;
// for (int x = 0; x < size; x++) {
// result.append(mTimes[x]);
// result.append(" ");
// }
return result.toString();
}
/**
* Calculates the average time but throws out the maximum as an outlier first.
*
* @return The average decoding time in milliseconds.
* @return The average decoding time in microseconds.
*/
private int getAverageTime() {
int size = mTimes.length;