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

Side by Side Diff: chrome/test/data/indexeddb/perf_test.js

Issue 1238393003: [IndexedDB] Adding traces, perf tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update Created 5 years, 4 months 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 var overallTestStartTime = window.performance.now(); 5 var overallTestStartTime = window.performance.now();
6 var kUseIndex = true; 6 var kUseIndex = true;
7 var kDontUseIndex = false; 7 var kDontUseIndex = false;
8 var kReadKeysOnly = true; 8 var kReadKeysOnly = true;
9 var kReadDataToo = false; 9 var kReadDataToo = false;
10 var kWriteToo = true; 10 var kWriteToo = true;
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 // Open an index key cursor, then continue(key) to the last value. 91 // Open an index key cursor, then continue(key) to the last value.
92 [testCursorSeeks, 2000, 10, 4, kUseIndex], 92 [testCursorSeeks, 2000, 10, 4, kUseIndex],
93 ]; 93 ];
94 94
95 var currentTest = 0; 95 var currentTest = 0;
96 96
97 function test() { 97 function test() {
98 runNextTest(); 98 runNextTest();
99 } 99 }
100 100
101 var testFilter;
102
101 function runNextTest() { 103 function runNextTest() {
102 var filter = window.location.hash.slice(1); 104 var filter = testFilter;
103 var test, f; 105 var test, f;
104 while (currentTest < tests.length) { 106 while (currentTest < tests.length) {
105 test = tests[currentTest]; 107 test = tests[currentTest];
106 f = test.shift(); 108 f = test.shift();
107 if (!filter || f.name == filter) 109 if (!filter || f.name == filter)
108 break; 110 break;
109 ++currentTest; 111 ++currentTest;
110 } 112 }
111 113
112 if (currentTest < tests.length) { 114 if (currentTest < tests.length) {
(...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after
579 request.onerror = onError; 581 request.onerror = onError;
580 request.onsuccess = function() { 582 request.onsuccess = function() {
581 var cursor = request.result; 583 var cursor = request.result;
582 if (cursor && first) { 584 if (cursor && first) {
583 first = false; 585 first = false;
584 cursor.continue(getKey(numKeys - 1)); 586 cursor.continue(getKey(numKeys - 1));
585 } 587 }
586 }; 588 };
587 } 589 }
588 } 590 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698