зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1696945 - Part 2: Add Http Channel completon PerfStats r=necko-reviewers,dragana
Record from asyncOpen to channel completion in HttpChannelChild, for both network and cache sources. This will allow us to capture cross-platform networking timings in pageload and other scenarios. Differential Revision: https://phabricator.services.mozilla.com/D107507
This commit is contained in:
Родитель
3227459668
Коммит
a684bcf2c1
|
@ -11,6 +11,7 @@
|
|||
#include "nsHttp.h"
|
||||
#include "nsICacheEntry.h"
|
||||
#include "mozilla/BasePrincipal.h"
|
||||
#include "mozilla/PerfStats.h"
|
||||
#include "mozilla/Unused.h"
|
||||
#include "mozilla/dom/ContentChild.h"
|
||||
#include "mozilla/dom/DocGroup.h"
|
||||
|
@ -910,6 +911,15 @@ void HttpChannelChild::OnStopRequest(
|
|||
}
|
||||
#endif
|
||||
|
||||
if (mIsFromCache) {
|
||||
PerfStats::RecordMeasurement(PerfStats::Metric::HttpChannelCompletion_Cache,
|
||||
TimeStamp::Now() - mAsyncOpenTime);
|
||||
} else {
|
||||
PerfStats::RecordMeasurement(
|
||||
PerfStats::Metric::HttpChannelCompletion_Network,
|
||||
TimeStamp::Now() - mAsyncOpenTime);
|
||||
}
|
||||
|
||||
mResponseTrailers = MakeUnique<nsHttpHeaderArray>(aResponseTrailers);
|
||||
|
||||
DoPreOnStopRequest(aChannelStatus);
|
||||
|
|
Загрузка…
Ссылка в новой задаче