mirror of
https://github.com/zxing/zxing.git
synced 2025-02-02 05:41:08 -08:00
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:
parent
5a5987df88
commit
b3b945efcc
|
@ -35,8 +35,8 @@ public class BenchmarkItem {
|
||||||
mFormat = null;
|
mFormat = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addResult(int milliseconds) {
|
public void addResult(int microseconds) {
|
||||||
mTimes[mPosition] = milliseconds;
|
mTimes[mPosition] = microseconds;
|
||||||
mPosition++;
|
mPosition++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -55,19 +55,19 @@ public class BenchmarkItem {
|
||||||
result.append(mPath);
|
result.append(mPath);
|
||||||
result.append(" (");
|
result.append(" (");
|
||||||
result.append(getAverageTime());
|
result.append(getAverageTime());
|
||||||
result.append(" ms average)\n ");
|
result.append(" us average)");
|
||||||
int size = mTimes.length;
|
// int size = mTimes.length;
|
||||||
for (int x = 0; x < size; x++) {
|
// for (int x = 0; x < size; x++) {
|
||||||
result.append(mTimes[x]);
|
// result.append(mTimes[x]);
|
||||||
result.append(" ");
|
// result.append(" ");
|
||||||
}
|
// }
|
||||||
return result.toString();
|
return result.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Calculates the average time but throws out the maximum as an outlier first.
|
* 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() {
|
private int getAverageTime() {
|
||||||
int size = mTimes.length;
|
int size = mTimes.length;
|
||||||
|
|
Loading…
Reference in a new issue