Bug 1703956 - Extend network perfstats to include all http channel completion times r=necko-reviewers,valentin

Add HttpChannelCompletion, which is just the completion time for any request.
This allows us to measure overall improvements, instead of shifting requests from cache to network via RCWN.

Differential Revision: https://phabricator.services.mozilla.com/D111335
This commit is contained in:
Andrew Creskey 2021-04-12 21:42:21 +00:00
parent f493015fc5
commit 4f7b86c141
7 changed files with 14 additions and 9 deletions

View File

@ -912,14 +912,17 @@ void HttpChannelChild::OnStopRequest(
}
#endif
TimeDuration channelCompletionDuration = TimeStamp::Now() - mAsyncOpenTime;
if (mIsFromCache) {
PerfStats::RecordMeasurement(PerfStats::Metric::HttpChannelCompletion_Cache,
TimeStamp::Now() - mAsyncOpenTime);
channelCompletionDuration);
} else {
PerfStats::RecordMeasurement(
PerfStats::Metric::HttpChannelCompletion_Network,
TimeStamp::Now() - mAsyncOpenTime);
channelCompletionDuration);
}
PerfStats::RecordMeasurement(PerfStats::Metric::HttpChannelCompletion,
channelCompletionDuration);
mResponseTrailers = MakeUnique<nsHttpHeaderArray>(aResponseTrailers);

View File

@ -241,7 +241,7 @@ hw-g5-perfstats-gv:
--output $MOZ_FETCHES_DIR/../artifacts
--perfherder
--perfherder-app geckoview
--perfherder-metrics name:HttpChannelCompletion_Cache,unit:ms name:HttpChannelCompletion_Network,unit:ms name:DisplayListBuilding,unit:ms name:Reflowing,unit:ms name:Styling,unit:ms
--perfherder-metrics name:HttpChannelCompletion,unit:ms name:HttpChannelCompletion_Cache,unit:ms name:HttpChannelCompletion_Network,unit:ms name:DisplayListBuilding,unit:ms name:Reflowing,unit:ms name:Styling,unit:ms
--browsertime-iterations 10
--hooks testing/performance/hooks_perfstats.py
testing/performance/perftest_perfstats.js
@ -270,7 +270,7 @@ hw-p2-perfstats-gv:
--output $MOZ_FETCHES_DIR/../artifacts
--perfherder
--perfherder-app geckoview
--perfherder-metrics name:HttpChannelCompletion_Cache,unit:ms name:HttpChannelCompletion_Network,unit:ms name:DisplayListBuilding,unit:ms name:Reflowing,unit:ms name:Styling,unit:ms
--perfherder-metrics name:HttpChannelCompletion,unit:ms name:HttpChannelCompletion_Cache,unit:ms name:HttpChannelCompletion_Network,unit:ms name:DisplayListBuilding,unit:ms name:Reflowing,unit:ms name:Styling,unit:ms
--browsertime-iterations 10
--hooks testing/performance/hooks_perfstats.py
testing/performance/perftest_perfstats.js
@ -299,7 +299,7 @@ hw-g5-perfstats-fenix:
--output $MOZ_FETCHES_DIR/../artifacts
--perfherder
--perfherder-app fenix
--perfherder-metrics name:HttpChannelCompletion_Cache,unit:ms name:HttpChannelCompletion_Network,unit:ms name:DisplayListBuilding,unit:ms name:Reflowing,unit:ms name:Styling,unit:ms
--perfherder-metrics name:HttpChannelCompletion,unit:ms name:HttpChannelCompletion_Cache,unit:ms name:HttpChannelCompletion_Network,unit:ms name:DisplayListBuilding,unit:ms name:Reflowing,unit:ms name:Styling,unit:ms
--browsertime-iterations 10
--hooks testing/performance/hooks_perfstats.py
testing/performance/perftest_perfstats.js
@ -328,7 +328,7 @@ hw-p2-perfstats-fenix:
--output $MOZ_FETCHES_DIR/../artifacts
--perfherder
--perfherder-app fenix
--perfherder-metrics name:HttpChannelCompletion_Cache,unit:ms name:HttpChannelCompletion_Network,unit:ms name:DisplayListBuilding,unit:ms name:Reflowing,unit:ms name:Styling,unit:ms
--perfherder-metrics name:HttpChannelCompletion,unit:ms name:HttpChannelCompletion_Cache,unit:ms name:HttpChannelCompletion_Network,unit:ms name:DisplayListBuilding,unit:ms name:Reflowing,unit:ms name:Styling,unit:ms
--browsertime-iterations 10
--hooks testing/performance/hooks_perfstats.py
testing/performance/perftest_perfstats.js

View File

@ -230,7 +230,7 @@ perfstats:
--browsertime-geckodriver ${MOZ_FETCHES_DIR}/geckodriver
--output $MOZ_FETCHES_DIR/../artifacts
--perfherder
--perfherder-metrics name:HttpChannelCompletion_Cache,unit:ms name:HttpChannelCompletion_Network,unit:ms name:DisplayListBuilding,unit:ms name:Reflowing,unit:ms name:Styling,unit:ms
--perfherder-metrics name:HttpChannelCompletion,unit:ms name:HttpChannelCompletion_Cache,unit:ms name:HttpChannelCompletion_Network,unit:ms name:DisplayListBuilding,unit:ms name:Reflowing,unit:ms name:Styling,unit:ms
--browsertime-iterations 10
--hooks testing/performance/hooks_perfstats.py
testing/performance/perftest_perfstats.js

View File

@ -244,7 +244,7 @@ perfstats:
--browsertime-geckodriver ${MOZ_FETCHES_DIR}/geckodriver
--output $MOZ_FETCHES_DIR/../artifacts
--perfherder
--perfherder-metrics name:HttpChannelCompletion_Cache,unit:ms name:HttpChannelCompletion_Network,unit:ms name:DisplayListBuilding,unit:ms name:Reflowing,unit:ms name:Styling,unit:ms
--perfherder-metrics name:HttpChannelCompletion,unit:ms name:HttpChannelCompletion_Cache,unit:ms name:HttpChannelCompletion_Network,unit:ms name:DisplayListBuilding,unit:ms name:Reflowing,unit:ms name:Styling,unit:ms
--browsertime-iterations 10
--hooks testing/performance/hooks_perfstats.py
testing/performance/perftest_perfstats.js

View File

@ -193,7 +193,7 @@ perfstats:
--browsertime-node ${MOZ_FETCHES_DIR}/node/node.exe
--output $MOZ_FETCHES_DIR/../artifacts
--perfherder
--perfherder-metrics name:HttpChannelCompletion_Cache,unit:ms name:HttpChannelCompletion_Network,unit:ms name:DisplayListBuilding,unit:ms name:Reflowing,unit:ms name:Styling,unit:ms
--perfherder-metrics name:HttpChannelCompletion,unit:ms name:HttpChannelCompletion_Cache,unit:ms name:HttpChannelCompletion_Network,unit:ms name:DisplayListBuilding,unit:ms name:Reflowing,unit:ms name:Styling,unit:ms
--browsertime-iterations 10
--hooks testing/performance/hooks_perfstats.py
testing/performance/perftest_perfstats.js

View File

@ -27,6 +27,7 @@ static const char* const sMetricNames[] = {"DisplayListBuilding",
"Compositing",
"Reflowing",
"Styling",
"HttpChannelCompletion",
"HttpChannelCompletion_Network",
"HttpChannelCompletion_Cache"};

View File

@ -29,6 +29,7 @@ class PerfStats {
Compositing,
Reflowing,
Styling,
HttpChannelCompletion,
HttpChannelCompletion_Network,
HttpChannelCompletion_Cache,
Max