1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-27 09:12:41 +01:00

Show entire page weight in DarkConsole

Summary:
This provides an easier way to get a quick handle on page costs without
installing XHProf, which can be a bit complicated.

  - We currently show an "All" line, but it means "All Services".
  - Rename "All" to "All Services".
  - Add "Entire Page".

Test Plan: Looked at the services tab, saw "All Services" and "Entire Page".

Reviewers: btrahan, jungejason

Reviewed By: btrahan

CC: aran, btrahan

Differential Revision: https://secure.phabricator.com/D1305
This commit is contained in:
epriestley 2012-01-04 07:08:37 -08:00
parent 99231ebba4
commit 2e9bb62fe7

View file

@ -1,7 +1,7 @@
<?php
/*
* Copyright 2011 Facebook, Inc.
* Copyright 2012 Facebook, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -174,8 +174,11 @@ class DarkConsoleServicesPlugin extends DarkConsolePlugin {
$totals[$row['type']] = idx($totals, $row['type'], 0) + $row['duration'];
$counts[$row['type']] = idx($counts, $row['type'], 0) + 1;
}
$totals['All'] = array_sum($totals);
$counts['All'] = array_sum($counts);
$totals['All Services'] = array_sum($totals);
$counts['All Services'] = array_sum($counts);
$totals['Entire Page'] = $page_total;
$counts['Entire Page'] = '-';
$summary = array();
foreach ($totals as $type => $total) {