mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-11 10:38:11 +08:00
[client-app] Consolidate file download metric reporting
Summary: See title Test Plan: manual Reviewers: gleb, mark Reviewed By: mark Differential Revision: https://phab.nylas.com/D4256
This commit is contained in:
parent
1298d4c529
commit
09b88a759c
1 changed files with 4 additions and 2 deletions
|
@ -105,10 +105,11 @@ export class Download {
|
||||||
|
|
||||||
const onFailed = (err) => {
|
const onFailed = (err) => {
|
||||||
Actions.recordPerfMetric({
|
Actions.recordPerfMetric({
|
||||||
action: 'file-download-failed',
|
action: 'file-download',
|
||||||
accountId: this.accountId,
|
accountId: this.accountId,
|
||||||
actionTimeMs: Date.now() - before,
|
actionTimeMs: Date.now() - before,
|
||||||
maxValue: 10 * 60 * 1000,
|
maxValue: 10 * 60 * 1000,
|
||||||
|
succeeded: false,
|
||||||
})
|
})
|
||||||
this.request = null;
|
this.request = null;
|
||||||
stream.end();
|
stream.end();
|
||||||
|
@ -127,10 +128,11 @@ export class Download {
|
||||||
|
|
||||||
const onSuccess = () => {
|
const onSuccess = () => {
|
||||||
Actions.recordPerfMetric({
|
Actions.recordPerfMetric({
|
||||||
action: 'file-download-succeeded',
|
action: 'file-download',
|
||||||
accountId: this.accountId,
|
accountId: this.accountId,
|
||||||
actionTimeMs: Date.now() - before,
|
actionTimeMs: Date.now() - before,
|
||||||
maxValue: 10 * 60 * 1000,
|
maxValue: 10 * 60 * 1000,
|
||||||
|
succeeded: true,
|
||||||
})
|
})
|
||||||
this.request = null;
|
this.request = null;
|
||||||
stream.end();
|
stream.end();
|
||||||
|
|
Loading…
Reference in a new issue