Closed
Bug 1206346
Opened 11 years ago
Closed 10 years ago
Intermittent performance-timeline.https.html | User Timing - assert_greater_than: expected a number greater than 99 but got 98.98500000000001
Categories
(Core :: DOM: Service Workers, defect)
Core
DOM: Service Workers
Tracking
()
RESOLVED
FIXED
mozilla47
People
(Reporter: philor, Assigned: bkelly)
Details
(Keywords: intermittent-failure)
Attachments
(2 files, 2 obsolete files)
|
2.95 KB,
patch
|
bkelly
:
review+
|
Details | Diff | Splinter Review |
|
2.70 KB,
patch
|
jdm
:
review+
|
Details | Diff | Splinter Review |
No description provided.
| Comment hidden (Legacy TBPL/Treeherder Robot) |
| Comment hidden (Legacy TBPL/Treeherder Robot) |
| Comment hidden (Legacy TBPL/Treeherder Robot) |
| Comment hidden (Legacy TBPL/Treeherder Robot) |
| Comment hidden (Legacy TBPL/Treeherder Robot) |
| Comment hidden (Legacy TBPL/Treeherder Robot) |
| Comment hidden (Legacy TBPL/Treeherder Robot) |
| Comment hidden (Legacy TBPL/Treeherder Robot) |
| Comment hidden (Legacy TBPL/Treeherder Robot) |
| Comment hidden (Legacy TBPL/Treeherder Robot) |
| Comment hidden (Legacy TBPL/Treeherder Robot) |
| Comment hidden (Legacy TBPL/Treeherder Robot) |
| Comment hidden (Legacy TBPL/Treeherder Robot) |
| Comment hidden (Legacy TBPL/Treeherder Robot) |
| Comment hidden (Legacy TBPL/Treeherder Robot) |
| Comment hidden (Legacy TBPL/Treeherder Robot) |
| Comment hidden (Intermittent Failures Robot) |
| Comment hidden (Intermittent Failures Robot) |
| Comment hidden (Intermittent Failures Robot) |
| Comment hidden (Intermittent Failures Robot) |
| Comment hidden (Intermittent Failures Robot) |
| Comment hidden (Intermittent Failures Robot) |
| Comment hidden (Intermittent Failures Robot) |
| Comment hidden (Intermittent Failures Robot) |
| Comment hidden (Intermittent Failures Robot) |
| Comment hidden (Intermittent Failures Robot) |
| Comment hidden (Intermittent Failures Robot) |
| Comment hidden (Intermittent Failures Robot) |
| Comment hidden (Intermittent Failures Robot) |
| Comment hidden (Intermittent Failures Robot) |
| Comment hidden (Intermittent Failures Robot) |
| Comment hidden (Intermittent Failures Robot) |
| Comment hidden (Intermittent Failures Robot) |
| Comment hidden (Intermittent Failures Robot) |
| Assignee | ||
Comment 35•10 years ago
|
||
We already treat the duration as a fuzzy value since timers are not precise. Looks like we're just not flexible enough, though, since sometimes we miss the fuzzy match by 0.1 or so. Lets widen it and be a little more explicit about what we are doing.
https://treeherder.mozilla.org/#/jobs?repo=try&revision=ff260a88b1bd
| Comment hidden (Intermittent Failures Robot) |
| Assignee | ||
Comment 37•10 years ago
|
||
Josh has asked for some additional information:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=ee753256b0f4
| Assignee | ||
Comment 38•10 years ago
|
||
Here is a case that shows 99ms elapsed using Date.now():
https://treeherder.mozilla.org/logviewer.html#?job_id=16866225&repo=try#L163522
This comment suggests timers can run early on workers:
https://dxr.mozilla.org/mozilla-central/source/dom/workers/WorkerPrivate.cpp#5943
How would you like me to proceed? I could narrow the window a bit from the 5ms to something more like 1.5ms.
Flags: needinfo?(josh)
| Assignee | ||
Comment 39•10 years ago
|
||
And it seems our timers do indeed do some rounding such that they can fire early:
https://dxr.mozilla.org/mozilla-central/source/xpcom/threads/TimerThread.cpp#548
https://dxr.mozilla.org/mozilla-central/source/xpcom/threads/TimerThread.cpp#551
The accuracy of the timer is dependent on the platform.
https://dxr.mozilla.org/mozilla-central/source/xpcom/threads/TimerThread.cpp#424
The interval resolution on my win10 machine is 500us.
With the rounding down in the timer and the fuzzing in the performance API it seems reasonable we could end up just over 1ms early.
| Assignee | ||
Comment 40•10 years ago
|
||
Lets see what the timing resolution on try is:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=7b0a4b472c59
| Assignee | ||
Comment 41•10 years ago
|
||
Automation seems to have the same resolution.
Comment 42•10 years ago
|
||
Ok, in that case let's modify the fuzziness to be as large as we expect but no larger.
Flags: needinfo?(josh)
| Assignee | ||
Comment 43•10 years ago
|
||
I narrowed the fuzzy range to 1.5ms. I don't have confidence in my ability to trace all the rounding going on to go below that.
I also added an additional check against Date.now(). In general the two measurements should always round to the same integral number of milliseconds.
Attachment #8719182 -
Attachment is obsolete: true
Attachment #8719182 -
Flags: review?(josh)
Attachment #8720937 -
Flags: review?(josh)
| Assignee | ||
Comment 44•10 years ago
|
||
Updated•10 years ago
|
Attachment #8720937 -
Flags: review?(josh) → review+
| Assignee | ||
Comment 45•10 years ago
|
||
Hmm, my assertion that rounding the performance measurement should equal the date measurement is wrong. With the fuzzy performance measurement they can sometimes be off by 1. I'll use assert_approx_equals().
| Assignee | ||
Comment 46•10 years ago
|
||
| Assignee | ||
Comment 47•10 years ago
|
||
More tweaks to the Date.now() measurement assert:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=d6b5e61aebf4
Comment 48•10 years ago
|
||
| Assignee | ||
Comment 49•10 years ago
|
||
Attachment #8720937 -
Attachment is obsolete: true
Attachment #8721442 -
Flags: review+
| Reporter | ||
Comment 50•10 years ago
|
||
https://treeherder.mozilla.org/logviewer.html#?job_id=22058487&repo=mozilla-inbound
"User Timing - assert_approx_equals: expected 150 +/- 1 but got 100"
Keywords: leave-open
| Assignee | ||
Comment 51•10 years ago
|
||
50ms difference between performance.now() and Date.now() in comment 50. Did GC hit at just before setting endDate?
| Assignee | ||
Comment 52•10 years ago
|
||
And then in this case it got 82 instead of 100:
https://treeherder.mozilla.org/logviewer.html#?repo=mozilla-inbound&job_id=22062808
I think trying to compare Date.now() to performance.now() is a bad idea. According to MDN Date.now() reflects NTP changes while performance.now() does not. I don't think we can rely on the clocks being directly comparable.
I file a follow-up to remove the Date.now() comparison logic.
| Assignee | ||
Comment 53•10 years ago
|
||
Remove the comparison between Date.now() and performance.now() measurements. I don't think they are reliable in automation for these reasons:
1) A GC could happen between the performance.now() and the Date.now() skewing numbers. Particularly on debug builds any unexpected work is going to create large differences.
2) According to MDN, Date.now() reflects NTP changes while performance.now() does not. Virtualized hardware often requires clock tweaks to keep things in sync, so I think we might hit this semi-frequently in automation.
Attachment #8721660 -
Flags: review?(josh)
| Reporter | ||
Comment 54•10 years ago
|
||
| bugherder | ||
Updated•10 years ago
|
Attachment #8721660 -
Flags: review?(josh) → review+
| Assignee | ||
Updated•10 years ago
|
Keywords: leave-open → checkin-needed
Comment 55•10 years ago
|
||
Keywords: checkin-needed
Comment 56•10 years ago
|
||
| bugherder | ||
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
status-firefox47:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla47
| Comment hidden (Intermittent Failures Robot) |
Comment 58•10 years ago
|
||
status-firefox44:
--- → wontfix
status-firefox45:
--- → wontfix
status-firefox46:
--- → fixed
status-firefox-esr45:
--- → affected
Whiteboard: [checkin-needed-esr45]
Comment 59•10 years ago
|
||
Whiteboard: [checkin-needed-esr45]
You need to log in
before you can comment on or make changes to this bug.
Description
•