Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(253)

Unified Diff: tracing/tracing/extras/chrome/estimated_input_latency_test.html

Issue 2871573006: Gracefully handle floating-point precision errors in the EQT metric. (Closed)
Patch Set: rebase Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tracing/tracing/extras/chrome/estimated_input_latency.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tracing/tracing/extras/chrome/estimated_input_latency_test.html
diff --git a/tracing/tracing/extras/chrome/estimated_input_latency_test.html b/tracing/tracing/extras/chrome/estimated_input_latency_test.html
index 64878fddd3fdbed7997c9142032d7ec86051a5c2..d1a0fdf415aa47118e6ffda6cddc9304faa6e6dd 100644
--- a/tracing/tracing/extras/chrome/estimated_input_latency_test.html
+++ b/tracing/tracing/extras/chrome/estimated_input_latency_test.html
@@ -366,17 +366,17 @@ tr.b.unittest.testSuite(function() {
test('maxExpectedQueueingTimeInSlidingWindow_smallOverlapIsTolerated', () => {
// Allow small floating-point precision error when comparing task
- // end-points for overlaping.
- assert.closeTo((100.0001 + 0.0001) / 2,
+ // end-points for overlapping.
+ assert.closeTo((100.01 + 0.01) / 2,
maxExpectedQueueingTimeInSlidingWindow(0, 1000, 100,
- [{start: 0, end: 100.0001}, {start: 100.0, end: 200}]),
+ [{start: 0, end: 100.02}, {start: 100.0, end: 200}]),
1e-6);
});
test('maxExpectedQueueingTimeInSlidingWindow_largeOverlapThrows', () => {
- // Overlap larger than 1e-3 should trigger exception.
+ // Overlap larger than 0.1 should trigger exception.
assert.throws(() => maxExpectedQueueingTimeInSlidingWindow(0, 100, 10,
- [{start: 0, end: 100.0011}, {start: 100.0, end: 101}]),
+ [{start: 0, end: 100.11}, {start: 100.0, end: 101}]),
'Tasks must not overlap'
);
});
« no previous file with comments | « tracing/tracing/extras/chrome/estimated_input_latency.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698