Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(120)

Unified Diff: tools/perf/measurements/memory_pressure.py

Issue 798773002: Remove unneded memory_pressure benchmark and measurement. (Take 2) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/perf/benchmarks/memory_pressure.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/perf/measurements/memory_pressure.py
diff --git a/tools/perf/measurements/memory_pressure.py b/tools/perf/measurements/memory_pressure.py
deleted file mode 100644
index 182cac529fe563ad2c4d3cf1b3137bfb71317b78..0000000000000000000000000000000000000000
--- a/tools/perf/measurements/memory_pressure.py
+++ /dev/null
@@ -1,55 +0,0 @@
-# Copyright 2013 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""Multi tab memory test.
-
-This test is a multi tab test, but we're interested in measurements for
-the entire test rather than each single page.
-"""
-
-import logging
-
-from telemetry.value import histogram_util
-from telemetry.page import page_test
-
-
-class MemoryPressure(page_test.PageTest):
- def __init__(self, *args, **kwargs):
- super(MemoryPressure, self).__init__(*args, **kwargs)
- # _first_tab is used to access histograms
- self._is_first_page = True
- self._tab_count = 0
-
- # Allow histogram collection
- def CustomizeBrowserOptions(self, options):
- histogram_util.CustomizeBrowserOptions(options)
-
- # Open a new tab at each page
- def TabForPage(self, page, browser):
- return browser.tabs.New()
-
- def GetTabsHistogramCounts(self, tab):
- histogram_type = histogram_util.BROWSER_HISTOGRAM
- discard_count = histogram_util.GetHistogramCount(
- histogram_type, "Tabs.Discard.DiscardCount", tab)
- kill_count = histogram_util.GetHistogramCount(
- histogram_type, "Tabs.SadTab.KillCreated", tab)
- return (discard_count, kill_count)
-
- def ValidateAndMeasurePage(self, page, tab, results):
- # After navigating to each page, check if it triggered tab discards or
- # kills.
- (discard_count, kill_count) = self.GetTabsHistogramCounts(tab)
-
- # Sanity check for first page
- if self._is_first_page:
- self._is_first_page = False
- assert discard_count == 0 and kill_count == 0
-
- self._tab_count += 1
- # End the test at the first kill or discard.
- if kill_count > 0 or discard_count > 0:
- logging.info("test ending at tab %d, discards = %d, kills = %d" %
- (self._tab_count, discard_count, kill_count))
- self.RequestExit()
« no previous file with comments | « tools/perf/benchmarks/memory_pressure.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698