mirror of
https://github.com/zoriya/react-native-web.git
synced 2026-08-15 18:45:06 +00:00
Benchmarks report total run time
This commit is contained in:
@@ -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}
|
||||
/>
|
||||
|
||||
@@ -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>
|
||||
) : (
|
||||
|
||||
Reference in New Issue
Block a user