Benchmarks report total run time

This commit is contained in:
Nicolas Gallagher
2018-01-21 17:02:21 -08:00
parent e4e6147081
commit 935970156c
2 changed files with 11 additions and 2 deletions
+1
View File
@@ -100,6 +100,7 @@ export default class App extends Component {
libraryName={r.libraryName}
libraryVersion={r.libraryVersion}
mean={r.mean}
runTime={r.runTime}
sampleCount={r.sampleCount}
stdDev={r.stdDev}
/>
+10 -2
View File
@@ -8,7 +8,15 @@ const fmt = (time: number) => {
return 10 / i > 1 ? `0${i}` : i;
};
const ReportCard = ({ benchmarkName, libraryName, sampleCount, mean, stdDev, libraryVersion }) => {
const ReportCard = ({
benchmarkName,
libraryName,
sampleCount,
mean,
stdDev,
runTime,
libraryVersion
}) => {
const sampleCountText = sampleCount != null ? `(${sampleCount})` : '';
return (
@@ -29,7 +37,7 @@ const ReportCard = ({ benchmarkName, libraryName, sampleCount, mean, stdDev, lib
</Text>
<Text style={[styles.monoFont, styles.centerText]}>
<Text style={styles.smallText}>Σ = </Text>
<Text>{Math.round(mean * sampleCount)} ms</Text>
<Text>{Math.round(runTime)} ms</Text>
</Text>
</Fragment>
) : (