MCPcopy Index your code
hub / github.com/react/react / calculateMeanAndSdOfRatioFromDeltaMethod

Function calculateMeanAndSdOfRatioFromDeltaMethod

scripts/bench/stats.js:28–41  ·  view source on GitHub ↗
(
  meanControl,
  meanTest,
  semControl,
  semTest
)

Source from the content-addressed store, hash-verified

26}
27
28function calculateMeanAndSdOfRatioFromDeltaMethod(
29 meanControl,
30 meanTest,
31 semControl,
32 semTest
33) {
34 const mean =
35 (meanTest - meanControl) / meanControl -
36 (Math.pow(semControl, 2) * meanTest) / Math.pow(meanControl, 3);
37 const variance =
38 Math.pow(semTest / meanControl, 2) +
39 Math.pow(semControl * meanTest, 2) / Math.pow(meanControl, 4);
40 return [mean, Math.sqrt(variance)];
41}
42
43function addBenchmarkResults(table, localResults, remoteMasterResults) {
44 const benchmarks = Object.keys(

Callers 1

percentChangeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected