summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcmumford@chromium.org <cmumford@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-05 19:10:16 +0000
committercmumford@chromium.org <cmumford@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-05 19:10:16 +0000
commit738e90377a763466363eaa21d537b9d0bd6e1206 (patch)
tree90ea3a0604dba6b352f3af1a604e8d19fb7aa3af
parente27e0090a0e54974b663500743486d25b7419a9f (diff)
downloadchromium_src-738e90377a763466363eaa21d537b9d0bd6e1206.zip
chromium_src-738e90377a763466363eaa21d537b9d0bd6e1206.tar.gz
chromium_src-738e90377a763466363eaa21d537b9d0bd6e1206.tar.bz2
Delete the IndexedDB Page Cycler test.
indexeddb_perf has been enhanced to include the few things missing that was performed by this test. This test is now redundant. BUG=196406 Review URL: https://codereview.chromium.org/155203002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@249070 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--tools/page_cycler/indexed_db/basic_insert/index.html91
-rw-r--r--tools/page_cycler/indexed_db/basic_insert/start.html9
-rw-r--r--tools/page_cycler/indexed_db/common.js32
-rw-r--r--tools/page_cycler/indexed_db/head.js125
-rw-r--r--tools/perf/benchmarks/page_cycler.py7
-rw-r--r--tools/perf/page_sets/page_cycler/indexed_db/basic_insert.json8
-rwxr-xr-xtools/perf/run_benchmark1
-rw-r--r--tools/perf/test-info.json3
8 files changed, 0 insertions, 276 deletions
diff --git a/tools/page_cycler/indexed_db/basic_insert/index.html b/tools/page_cycler/indexed_db/basic_insert/index.html
deleted file mode 100644
index 146355d..0000000
--- a/tools/page_cycler/indexed_db/basic_insert/index.html
+++ /dev/null
@@ -1,91 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<title>Basic Insert</title>
-<script src="../head.js"></script>
-<script src="../common.js"></script>
-<script>
- var RECORDS = 3000;
-
- var failed = false;
- function error(event) {
- log('Error ' + event.target.errorCode + ': '
- + event.target.webkitErrorMessage);
-
- if (!failed)
- testComplete(TEST_FAILED);
- failed = true;
- }
-
- function start() {
- if (!setup())
- testComplete(SETUP_FAILED);
-
- var request = indexedDB.deleteDatabase('idb_basic_insert');
- request.onsuccess = onDelete;
- request.onerror = error;
- request.onblocked = function(e) {
- console.log("delete got blocked event");
- };
- }
-
- function onDelete() {
- request = indexedDB.open('idb_basic_insert');
- request.onblocked = function(e) { console.log("open got blocked event"); };
- request.onerror = error;
- request.onupgradeneeded = function(e) {
- createObjectStores(e.target.result);
- };
- request.onsuccess = function(e) {
- db = request.result;
- var curVersion = db.version;
- if (curVersion !== 1) {
- // Old reference build that doesn't have upgradeneeded.
- // TODO(dgrogan): Remove when reference build is version 23 or later.
- var setVersionRequest = db.setVersion("1");
- setVersionRequest.onerror = error;
- setVersionRequest.onsuccess = function(e) {
- createObjectStores(db);
- var versionTransaction = setVersionRequest.result;
- versionTransaction.onerror = error;
- versionTransaction.oncomplete = storeCreated;
- }
- } else {
- storeCreated();
- }
- };
- }
-
- function createObjectStores(db) {
- db.createObjectStore('store');
- }
-
- function storeCreated() {
- var transaction = db.transaction(['store'], 'readwrite');
- transaction.oncomplete = insertsDone;
- transaction.onabort = function(e) {
- console.log("readwrite transaction aborted");
- };
-
- var objectStore = transaction.objectStore('store');
- log('Inserting ' + RECORDS + ' records with explicit key.');
- startTime = new Date();
- for (var i = 0; i < RECORDS; i++) {
- var x = Math.floor(Math.random() * 1000000);
- objectStore.put(x, x).onerror = error;
- }
- }
-
- function insertsDone() {
- var now = Date.now();
- var diff = now - startTime;
- log('Inserted ' + RECORDS + ' records in ' + diff + ' ms (' + diff /
- RECORDS + ' ms per record)');
-
- if (!failed)
- testComplete(now - startTime);
- }
-</script>
-
-<body onLoad="start()">
-</body>
-</html>
diff --git a/tools/page_cycler/indexed_db/basic_insert/start.html b/tools/page_cycler/indexed_db/basic_insert/start.html
deleted file mode 100644
index 9711869..0000000
--- a/tools/page_cycler/indexed_db/basic_insert/start.html
+++ /dev/null
@@ -1,9 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<body>
-<h3>Note: You must have started chrome with <tt>--enable-file-cookies</tt> for
- this test to work manually.</h3>
-<script>document.cookie = "__pc_pages=basic_insert; path=/";</script>
-<script src="../../common/start.js"></script>
-</body>
-</html>
diff --git a/tools/page_cycler/indexed_db/common.js b/tools/page_cycler/indexed_db/common.js
deleted file mode 100644
index 18d3607..0000000
--- a/tools/page_cycler/indexed_db/common.js
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright (c) 2012 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.
-
-var CANNOT_OPEN_DB = -1;
-var SETUP_FAILED = -2;
-var TEST_FAILED = -3;
-
-function setup() {
- window.indexedDB = window.indexedDB || window.webkitIndexedDB;
- window.IDBKeyRange = window.IDBKeyRange || window.webkitIDBKeyRange;
-
- if ('indexedDB' in window)
- return true;
-
- return false;
-}
-
-function getOrAddElement(id, type) {
- var elem = document.getElementById(id);
- if (!elem) {
- elem = document.createElement(type);
- elem.id = id;
- document.body.appendChild(elem);
- }
- return elem;
-}
-
-function log(msg) {
- var logElem = getOrAddElement('logElem', 'DIV');
- logElem.innerHTML += msg + '<br>';
-} \ No newline at end of file
diff --git a/tools/page_cycler/indexed_db/head.js b/tools/page_cycler/indexed_db/head.js
deleted file mode 100644
index a36ce77..0000000
--- a/tools/page_cycler/indexed_db/head.js
+++ /dev/null
@@ -1,125 +0,0 @@
-// Copyright (c) 2012 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.
-
-var totalTime;
-var fudgeTime;
-var elapsedTime;
-var endTime;
-var iterations;
-var cycle;
-var results = false;
-var TIMEOUT = 15;
-
-/**
- * Returns the value of the given property stored in the cookie.
- * @param {string} name The property name.
- * @return {string} The value of the given property, or empty string
- * if the property was not found.
- */
-function __get_cookie(name) {
- var cookies = document.cookie.split('; ');
- for (var i = 0; i < cookies.length; ++i) {
- var t = cookies[i].split('=');
- if ((t[0] == name) && t[1])
- return t[1];
- }
- return '';
-}
-
-function __get_timings() {
- if (sessionStorage == null)
- return __get_cookie("__pc_timings");
- else {
- if (sessionStorage.getItem("__pc_timings") == null)
- return "";
- else
- return sessionStorage["__pc_timings"];
- }
-}
-function __set_timings(timings) {
- if (sessionStorage == null)
- document.cookie = "__pc_timings=" + timings + "; path=/";
- else
- sessionStorage["__pc_timings"]=timings;
-}
-
-/**
- * Starts the next test cycle or redirects the browser to the results page.
- */
-function nextCycleOrResults() {
- // Call GC twice to cleanup JS heap before starting a new test.
- if (window.gc) {
- window.gc();
- window.gc();
- }
-
- var timings = elapsedTime;
- var oldTimings = __get_timings();
- if (oldTimings != '')
- timings = oldTimings + ',' + timings;
- __set_timings(timings);
-
- var tLag = Date.now() - endTime - TIMEOUT;
- if (tLag > 0)
- fudgeTime += tLag;
-
- var doc;
- if (cycle == iterations) {
- document.cookie = '__pc_done=1; path=/';
- doc = '../../common/report.html';
- if (window.console) {
- console.log("Pages: [" + __get_cookie('__pc_pages') + "]");
- console.log("times: [" + __get_timings() + "]");
- }
- } else {
- doc = 'index.html';
- }
-
- var url = doc + '?n=' + iterations + '&i=' + cycle +
- '&td=' + totalTime + '&tf=' + fudgeTime;
- document.location.href = url;
-}
-
-/**
- * Computes various running times and updates the stats reported at the end.
- * @param {!number} cycleTime The running time of the test cycle.
- */
-function testComplete(cycleTime) {
- if (results)
- return;
-
- var oldTotalTime = 0;
- var cycleEndTime = Date.now();
- var cycleFudgeTime = 0;
-
- var s = document.location.search;
- if (s) {
- var params = s.substring(1).split('&');
- for (var i = 0; i < params.length; i++) {
- var f = params[i].split('=');
- switch (f[0]) {
- case 'skip':
- return; // No calculation, just viewing
- case 'n':
- iterations = f[1];
- break;
- case 'i':
- cycle = f[1] - 0 + 1;
- break;
- case 'td':
- oldTotalTime = f[1] - 0;
- break;
- case 'tf':
- cycleFudgeTime = f[1] - 0;
- break;
- }
- }
- }
- elapsedTime = cycleTime;
- totalTime = oldTotalTime + elapsedTime;
- endTime = cycleEndTime;
- fudgeTime = cycleFudgeTime;
-
- setTimeout(nextCycleOrResults, TIMEOUT);
-}
diff --git a/tools/perf/benchmarks/page_cycler.py b/tools/perf/benchmarks/page_cycler.py
index a649918..b30e027 100644
--- a/tools/perf/benchmarks/page_cycler.py
+++ b/tools/perf/benchmarks/page_cycler.py
@@ -20,13 +20,6 @@ class PageCyclerDhtml(test.Test):
options = {'pageset_repeat_iters': 10}
-class PageCyclerIndexeddb(test.Test):
- tag = 'indexed_db'
- test = page_cycler.PageCycler
- page_set = 'page_sets/page_cycler/indexed_db/basic_insert.json'
- options = {'pageset_repeat_iters': 10}
-
-
class PageCyclerIntlArFaHe(test.Test):
test = page_cycler.PageCycler
page_set = 'page_sets/intl_ar_fa_he.json'
diff --git a/tools/perf/page_sets/page_cycler/indexed_db/basic_insert.json b/tools/perf/page_sets/page_cycler/indexed_db/basic_insert.json
deleted file mode 100644
index 370cd82..0000000
--- a/tools/perf/page_sets/page_cycler/indexed_db/basic_insert.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "description": "Basic insert IndexedDB page_cycler benchmark",
- "serving_dirs": ["../../../../../tools/page_cycler/indexed_db/basic_insert",
- "../../../../../tools/page_cycler/indexed_db/common.js"],
- "pages": [
- { "url": "file://../../../../../tools/page_cycler/indexed_db/basic_insert/" }
- ]
-}
diff --git a/tools/perf/run_benchmark b/tools/perf/run_benchmark
index 12c0e9e..e6dd566 100755
--- a/tools/perf/run_benchmark
+++ b/tools/perf/run_benchmark
@@ -17,7 +17,6 @@ if __name__ == '__main__':
'image_decoding.tough_decoding_cases':
'image_decoding.image_decoding_measurement',
'media.tough_media_cases': 'media.tough_video_cases',
- 'page_cycler.indexeddb': 'page_cycler.indexed_db.basic_insert',
'page_cycler.pica': 'pica.pica',
}
sys.exit(test_runner.Main())
diff --git a/tools/perf/test-info.json b/tools/perf/test-info.json
index 8482baa..23b094c 100644
--- a/tools/perf/test-info.json
+++ b/tools/perf/test-info.json
@@ -132,9 +132,6 @@
"page_cycler.dhtml":{
"description":"Benchmarks for various DHTML operations like simple animations."
},
- "page_cycler.indexeddb":{
- "description":"Benchmark for a basic insert operation in Indexed DB."
- },
"page_cycler.intl_ar_fa_he":{
"description":"Page load time benchmark for a variety of pages in Arabic, Farsi and Hebrew. Runs against pages recorded in April, 2013."
},