This repository has been archived by the owner on Jan 17, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 128
Fix #3673, instrument response times in shot creation flow #3727
Merged
Merged
Changes from 1 commit
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
769748e
Fix #3673, instrument response times in shot creation flow
jaredhirsch efcfcde
Add a /timing route to record performance analytics
jaredhirsch f6b29d6
Send response timings to the /timing endpoint
jaredhirsch 20738a0
review feedback
jaredhirsch 08bffd5
more review feedback
jaredhirsch File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -182,10 +182,23 @@ sendEvent("click-install-firefox-home", {useBeacon: true}); | |
|
||
#### Add-on performance measurements | ||
|
||
Performance measurements use the GA User Timings API, instead of the regular Event API. | ||
|
||
##### User Timings schema | ||
|
||
Each item in these events requires: | ||
|
||
Timing category: maps to the "source": `addon` or `web` | ||
|
||
Timing action: what kind of performance measure, currently just `perf-response-time`, which measures the "response" in the RAIL performance model: the time from a user interaction (like a button click) to a user-visible change in the UI. | ||
|
||
Timing variable: which event's performance is being measured. This generally is the same as the name of the event used to start the measurement, such as `start-shot`. | ||
|
||
Timing value: the number of milliseconds associated with the variable. For `perf-response-time`, the response time in milliseconds. | ||
|
||
##### Internal-only events | ||
|
||
Internal-only events are used to measure the time from user input to user-visible UI response. | ||
Internal-only events are used to help measure user timings, but aren't useful to record on their own. | ||
|
||
*NOTE: Internal-only events are not submitted to GA.* | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Probably these don't even need to be documented, but... well, no harm. |
||
|
||
|
@@ -197,54 +210,54 @@ Internal-only events are used to measure the time from user input to user-visibl | |
|
||
##### First step: starting the shot | ||
|
||
1. [x] Time from clicking the page action (or toolbar button) to displaying the preselection iframe, `addon/perf-response-time/page-action` with `cd1: {ms response time}` | ||
1. [x] Time from clicking the page action (or toolbar button) to displaying the preselection iframe, `addon/perf-response-time/page-action` | ||
- Start: `addon/start-shot/toolbar-button` | ||
- End: `addon/internal/unhide-preselection-frame` | ||
1. [x] Time from clicking the context menu item to displaying the preselection iframe, `addon/perf-response-time/context-menu` with `cd1: {ms response time}` | ||
1. [x] Time from clicking the context menu item to displaying the preselection iframe, `addon/perf-response-time/context-menu` | ||
- Start: `addon/start-shot/context-menu` | ||
- End: `addon/internal/unhide-preselection-frame` | ||
|
||
##### Second step: choosing the shot contents | ||
|
||
1. [x] Time from initiating a selection on screen to seeing the selection, `addon/perf-response-time/make-selection` with `cd1: {ms response time}` | ||
1. [x] Time from initiating a selection on screen to seeing the selection, `addon/perf-response-time/make-selection` | ||
- Start: `addon/make-selection` | ||
- End: `addon/internal/unhide-selection-frame` | ||
1. [x] Time from clicking the 'full page' button to displaying the preview iframe, `addon/perf-response-time/capture-full-page` with `cd1: {ms response time}` | ||
1. [x] Time from clicking the 'full page' button to displaying the preview iframe, `addon/perf-response-time/capture-full-page` | ||
- Start: `addon/capture-full-page` | ||
- End: `addon/internal/unhide-preview-frame` | ||
1. [x] Time from clicking the 'save visible' button to displaying the preview iframe, `addon/perf-response-time/capture-visible` with `cd1: {ms response time}` | ||
1. [x] Time from clicking the 'save visible' button to displaying the preview iframe, `addon/perf-response-time/capture-visible` | ||
- Start: `addon/capture-visible` | ||
- End: `addon/internal/unhide-preview-frame` | ||
|
||
##### Third step: upload or download | ||
|
||
For uploads, the measurement is from clicking the save button to a new tab being opened: | ||
|
||
1. [x] Save a selection shot (Enter key or button click), `addon/perf-response-time/save-shot` with `cd1: {ms response time}` | ||
1. [x] Save a selection shot (Enter key or button click), `addon/perf-response-time/save-shot` | ||
- Start: `addon/save-shot` | ||
- End: `addon/internal/open-shot-tab` | ||
1. [x] Save a full page shot, `addon/perf-response-time/save-full-page` with `cd1: {ms response time}` | ||
1. [x] Save a full page shot, `addon/perf-response-time/save-full-page` | ||
- Start: `addon/save-full-page` | ||
- End: `addon/internal/open-shot-tab` | ||
1. [x] Save a truncated full page shot, `addon/perf-response-time/save-full-page-truncated` with `cd1: {ms response time}` | ||
1. [x] Save a truncated full page shot, `addon/perf-response-time/save-full-page-truncated` | ||
- Start: `addon/save-full-page-truncated` | ||
- End: `addon/internal/open-shot-tab` | ||
1. [x] Save a visible selection shot, `addon/perf-response-time/save-visible` with `cd1: {ms response time}` | ||
1. [x] Save a visible selection shot, `addon/perf-response-time/save-visible` | ||
- Start: `addon/save-visible` | ||
- End: `addon/internal/open-shot-tab` | ||
|
||
For downloads, because Firefox doesn't always show download UI, the measurement is from clicking the download button to the screenshots UI being hidden: | ||
|
||
1. [x] Download a selection shot, `addon/perf-response-time/download-shot` with `cd1: {ms response time}` | ||
1. [x] Download a selection shot, `addon/perf-response-time/download-shot` | ||
- Start: `addon/download-shot` | ||
- End: `addon/internal/deactivate` | ||
1. [x] Download a full page shot, `addon/perf-response-time/download-full-page` with `cd1: {ms response time}` | ||
1. [x] Download a full page shot, `addon/perf-response-time/download-full-page` | ||
- Start: `addon/download-full-page` | ||
- End: `addon/internal/deactivate` | ||
1. [x] Download a truncated full page shot, `addon/perf-response-time/download-full-page-truncated` with `cd1: {ms response time}` | ||
1. [x] Download a truncated full page shot, `addon/perf-response-time/download-full-page-truncated` | ||
- Start: `addon/download-full-page-truncated` | ||
- End: `addon/internal/deactivate` | ||
1. [x] Download a visible selection shot, `addon/perf-response-time/download-visible` with `cd1: {ms response time}` | ||
1. [x] Download a visible selection shot, `addon/perf-response-time/download-visible` | ||
- Start: `addon/download-visible` | ||
- End: `addon/internal/deactivate` | ||
|
||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Technically I don't think this will reject the promise, if there's an exception in the function then the promise will just hang. But it will report something to Sentry.