Investigate negative durations for pre-account ping
Categories
(Toolkit :: Telemetry, task, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox68 | --- | fixed |
People
(Reporter: janerik, Assigned: janerik)
References
Details
Attachments
(2 files)
47 bytes,
text/x-phabricator-request
|
Details | Review | |
2.36 KB,
text/plain
|
chutten
:
data-review+
|
Details |
During validation of the early ecosystem ping ("pre-account" ping), I noted that we see negative durations in the pings.
The duration should be the time between 2 pings (or since session start). It should therefore never be negative. It is though.
We should try to find out what is happening and determine if it is a bug in our implementation of time accounting, invalid values we get from the OS or otherwise bogus data.
Comment 1•6 years ago
|
||
Bugbug thinks this bug is a task, but please change it back in case of error.
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Comment 2•6 years ago
|
||
One thing to note: so far occurring on Windows only.
Assignee | ||
Comment 3•6 years ago
|
||
For the lack of any good answer, I'll at least document the current state:
That's the duration calculation in EcosystemPing.jsm.
let now = Policy.monotonicNow();
let duration = Math.round((now - this._lastSendTime) / 1000);
this._lastSendTime = now;
this._lastSendtime
defaults to 0 at initialization.
monotonicNow
is a bit misnamed and is a monotonic increasing count of milliseconds since process start.
monotonicNow
is implemented as TimeStamp::NowLoRes() - TimeStamp::ProcessCreation()
(see the implementation here).
For the duration becoming negative (and wee see values like -9466577789
) one of these has to happen:
- We get a large
now
and store it into_lastSendTime
. In the next round we get a smallnow
and subtract the large value, resulting in a negative value - We get a negative
now
and store it into_lastSendTime
. In the next round we get a largenow
and subtract the large value, resulting in an even larger negative value
Possible next steps:
- We could do an analysis on the main ping and its session lengths to check if we see this or wait until we have IDs in the pre-account ping
- We could report
lastSendTime
andnow
as raw values in the ping to see what's happening
Assignee | ||
Comment 4•6 years ago
|
||
Assignee | ||
Comment 5•6 years ago
|
||
Attaching a patch to get the old and new timestamps, so we might take a look and check what values we are actually seeing.
Next step would be to find someone responsible for TimeStamp
and get them to help.
Assignee | ||
Comment 6•6 years ago
|
||
Comment 7•6 years ago
|
||
Comment 9•6 years ago
|
||
bugherder |
Description
•