Closed Bug 916076 Opened 12 years ago Closed 11 years ago

[OS.File] Add telemetry for jank in OS.File.writeAtomic

Categories

(Toolkit Graveyard :: OS.File, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla29

People

(Reporter: Yoric, Assigned: Yoric)

References

Details

(Keywords: main-thread-io, Whiteboard: [Async:team][Snappy][mentor=Yoric][lang=js][good first bug])

Attachments

(2 files, 5 obsolete files)

Calls to OS.File.writeAtomic can cause jank if the data being sent across threads is too large. We need to record Telemetry data on this. That telemetry data should give us the duration and file name. (marking this as main-thread-io, although it's thread communication cost rather than disk I/O)
Whiteboard: [Async][Snappy] → [Async:meeting][Snappy]
Whiteboard: [Async:meeting][Snappy] → [Async:ready][Snappy][mentor=Yoric][lang=js][good first bug]
Summary: [OS.File] Telemetry for OS.File.writeAtomic causing jank → [OS.File] Add telemetry for jank in OS.File.writeAtomic
I'll need the data soon, so grabbing bug.
Assignee: nobody → dteller
Whiteboard: [Async:ready][Snappy][mentor=Yoric][lang=js][good first bug] → [Async:team][Snappy][mentor=Yoric][lang=js][good first bug]
Attached patch jank (obsolete) — Splinter Review
As it turns out, we have performance issues caused by the time it takes to launch the OS.File worker, so I have taken the opportunity to also add Telemetry on that.
Attachment #8361644 - Flags: review?(nfroyd)
Comment on attachment 8361644 [details] [diff] [review] jank Review of attachment 8361644 [details] [diff] [review]: ----------------------------------------------------------------- Can you write a test for this? Maybe just making sure that a) the histograms get populated when you launch a worker and b) that OSFILE_WORKER_READY_MS >= OSFILE_WORKER_LAUNCH_MS?
Attachment #8361644 - Flags: review?(nfroyd) → review+
Attached patch Companion tests (obsolete) — Splinter Review
Attachment #8362385 - Flags: review?(nfroyd)
Attached patch Telemetry for OS.File (obsolete) — Splinter Review
Same code, just changed the commit message.
Attachment #8361644 - Attachment is obsolete: true
Attachment #8362442 - Flags: review+
Comment on attachment 8362385 [details] [diff] [review] Companion tests Review of attachment 8362385 [details] [diff] [review]: ----------------------------------------------------------------- ::: toolkit/components/osfile/tests/xpcshell/test_telemetry.js @@ +43,5 @@ > + do_check_eq(getCount(after[LAUNCH]), getCount(before[LAUNCH]) + 1); > + do_check_eq(getCount(after[READY]), getCount(before[READY]) + 1); > + > + do_print("Ensuring that ready > launch"); > + do_check_true(after[LAUNCH].sum <= after[READY].sum); Nit: Please make the order and logic of the informative output match the order and logic of the check statement.
Attachment #8362385 - Flags: review?(nfroyd) → review+
Attached patch Telemetry for OS.File (obsolete) — Splinter Review
Trivial fix
Attachment #8362442 - Attachment is obsolete: true
Attachment #8362551 - Flags: review+
Attached patch Companion tests, v2 (obsolete) — Splinter Review
Applied feedback. I took the opportunity to move a test from mochi/ to xpcshell/ as I had to debug it due to a typo. Self-reviewing, since it's just a move.
Attachment #8362385 - Attachment is obsolete: true
Attachment #8362554 - Flags: review+
Should work better if I don't forget one file. Try: https://tbpl.mozilla.org/?tree=Try&rev=a97447fb87c1
Attachment #8362554 - Attachment is obsolete: true
Attachment #8362898 - Flags: review+
Flags: in-testsuite+
Keywords: checkin-needed
Whiteboard: [Async:team][Snappy][mentor=Yoric][lang=js][good first bug] → [Async:team][Snappy][mentor=Yoric][lang=js][good first bug][fixed-in-fx-team]
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Whiteboard: [Async:team][Snappy][mentor=Yoric][lang=js][good first bug][fixed-in-fx-team] → [Async:team][Snappy][mentor=Yoric][lang=js][good first bug]
Target Milestone: --- → mozilla29
Product: Toolkit → Toolkit Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: