diff --git a/lighthouse-core/lib/page-functions.js b/lighthouse-core/lib/page-functions.js index b674e0d60db7..d3be4d512d84 100644 --- a/lighthouse-core/lib/page-functions.js +++ b/lighthouse-core/lib/page-functions.js @@ -149,7 +149,7 @@ function ultradumbBenchmark() { } const durationInSeconds = (Date.now() - start) / 1000; - return iterations / durationInSeconds; + return Math.round(iterations / durationInSeconds); } module.exports = { diff --git a/proto/lighthouse-result.proto b/proto/lighthouse-result.proto index 73c0c536edfe..98049b2e349b 100644 --- a/proto/lighthouse-result.proto +++ b/proto/lighthouse-result.proto @@ -69,7 +69,7 @@ message LighthouseResult { string host_user_agent = 2; // The benchmark index that indicates rough device class - int32 benchmark_index = 3; + google.protobuf.DoubleValue benchmark_index = 3; } // The environment that the audit was run in @@ -110,7 +110,7 @@ message LighthouseResult { repeated string output = 1; // The maximum amount of time to wait for loading in ms - int32 max_wait_for_load = 2; + google.protobuf.DoubleValue max_wait_for_load = 2; // Network throttling options enum ThrottlingMethod { @@ -133,7 +133,7 @@ message LighthouseResult { // Message containing the throttling settings used in an LH configuration message Throttling { // The round trip time in ms - int32 rtt_ms = 1; + google.protobuf.DoubleValue rtt_ms = 1; // The throughput in kilobytes per second google.protobuf.DoubleValue throughput_kbps = 2; @@ -148,7 +148,7 @@ message LighthouseResult { google.protobuf.DoubleValue upload_throughput_kbps = 5; // The amount of slowdown to apply to the cpu - int32 cpu_slowdown_multiplier = 6; + google.protobuf.DoubleValue cpu_slowdown_multiplier = 6; } // The throttling settings used diff --git a/proto/sample_v2_round_trip.json b/proto/sample_v2_round_trip.json index 9f844dfc8205..8542cf721077 100644 --- a/proto/sample_v2_round_trip.json +++ b/proto/sample_v2_round_trip.json @@ -3244,7 +3244,7 @@ "extraHeaders": null, "gatherMode": false, "locale": "en-US", - "maxWaitForLoad": 45000, + "maxWaitForLoad": 45000.0, "onlyAudits": null, "onlyCategories": null, "output": [ @@ -3252,17 +3252,17 @@ ], "skipAudits": null, "throttling": { - "cpuSlowdownMultiplier": 4, + "cpuSlowdownMultiplier": 4.0, "downloadThroughputKbps": 1474.5600000000002, "requestLatencyMs": 562.5, - "rttMs": 150, + "rttMs": 150.0, "throughputKbps": 1638.4, "uploadThroughputKbps": 675.0 }, "throttlingMethod": "devtools" }, "environment": { - "benchmarkIndex": 1000, + "benchmarkIndex": 1000.0, "hostUserAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3358.0 Safari/537.36", "networkUserAgent": "Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5 Build/MRA58N) AppleWebKit/537.36(KHTML, like Gecko) Chrome/66.0.3359.30 Mobile Safari/537.36" },