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

Unified Diff: chrome/test/data/indexeddb/perf_test.js

Issue 344683002: Deleted testSporadicWrites IndexedDB performance test. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed reference to sporadic writes from test description Created 6 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/perf/benchmarks/indexeddb_perf.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/indexeddb/perf_test.js
diff --git a/chrome/test/data/indexeddb/perf_test.js b/chrome/test/data/indexeddb/perf_test.js
index 1221e96019022ef37561e6a718f0778f09975b5a..853fbbfdf9e897fd26384b5b0dcebc7b09068c0e 100644
--- a/chrome/test/data/indexeddb/perf_test.js
+++ b/chrome/test/data/indexeddb/perf_test.js
@@ -69,25 +69,6 @@ var tests = [
// Read a sequence of an index into an object store via a key cursor.
[testCursorReadsAndRandomWrites, kReadKeysOnly, kUseIndex, kDontWrite,
kPlaceholderArg],
-// Make batches of random writes into a store, triggered by periodic setTimeout
-// calls.
- [testSporadicWrites, 5, 0, kDontRead],
-// Make large batches of random writes into a store, triggered by periodic
-// setTimeout calls.
- [testSporadicWrites, 50, 0, kDontRead],
-// Make batches of random writes into a store with many indices, triggered by
-// periodic setTimeout calls.
- [testSporadicWrites, 5, 10, kDontRead],
-// Make large batches of random writes into a store with many indices, triggered
-// by periodic setTimeout calls.
- [testSporadicWrites, 50, 10, kDontRead],
-// Make batches of random writes into a store, triggered by periodic setTimeout
-// calls. Intersperse read transactions to test read-write lock conflicts.
- [testSporadicWrites, 5, 0, kAlternateWithReads],
-// Make large batches of random writes into a store, triggered by periodic
-// setTimeout calls. Intersperse read transactions to test read-write lock
-// conflicts.
- [testSporadicWrites, 50, 0, kAlternateWithReads],
// Make a small bunch of batches of reads of the same keys from an object store.
[testReadCache, 10, kDontUseIndex],
// Make a bunch of batches of reads of the same keys from an index.
@@ -448,81 +429,6 @@ function testCursorReadsAndRandomWrites(
}
}
-function testSporadicWrites(
- numOperationsPerTransaction, numIndices, alternateWithReads,
- onTestComplete) {
- var numKeys = 1000;
- // With 30 transactions, spaced 50ms apart, we'll need at least 1.5s.
- var numTransactions = 30;
- if (alternateWithReads)
- numTransactions *= 2;
- var delayBetweenBatches = 50;
- var indexName;
- var testName = getDisplayName(arguments);
- var numTransactionsLeft = numTransactions;
- var objectStoreNames = ["store"];
- var numTransactionsRunning = 0;
-
- var getValue = getSimpleValue;
- if (numIndices)
- getValue = function (i) { return getNFieldObjectValue(i, numIndices); };
-
- automation.setStatus("Creating database.");
- var options = [];
- for (var i=0; i < numIndices; ++i) {
- var o = {};
- o.indexName = "index " + i;
- o.indexKeyPath = getNFieldName(i);
- o.indexIsUnique = false;
- o.indexIsMultiEntry = false;
- options.push(o);
- }
- createDatabase(testName, objectStoreNames, onCreated, onError, options);
-
- function onCreated(db) {
- automation.setStatus("Setting up test database.");
- var transaction = getTransaction(db, objectStoreNames, "readwrite",
- function() { onSetupComplete(db); });
- putLinearValues(transaction, objectStoreNames, numKeys, getSimpleKey,
- getValue);
- }
- var completionFunc;
- function onSetupComplete(db) {
- automation.setStatus("Setup complete.");
- completionFunc =
- getCompletionFunc(db, testName, window.performance.now(),
- onTestComplete);
- runOneBatch(db);
- }
-
- function runOneBatch(db) {
- assert(numTransactionsLeft);
- if (--numTransactionsLeft) {
- setTimeout(function () { runOneBatch(db); }, delayBetweenBatches);
- }
-
- var mode, transaction;
- if (alternateWithReads) {
- ++numTransactionsRunning;
- transaction =
- getTransaction(db, objectStoreNames, "readonly", batchComplete);
- getRandomValues(transaction, objectStoreNames,
- numOperationsPerTransaction, numKeys);
- }
- ++numTransactionsRunning;
- transaction =
- getTransaction(db, objectStoreNames, "readwrite", batchComplete);
- putRandomValues(transaction, objectStoreNames, numOperationsPerTransaction,
- numKeys);
-
- function batchComplete() {
- assert(numTransactionsRunning);
- if (!--numTransactionsRunning && !numTransactionsLeft)
- completionFunc();
- }
- }
-}
-
function testWalkingMultipleCursors(numCursors, onTestComplete) {
var numKeys = 1000;
var numHitsPerKey = 10;
« no previous file with comments | « no previous file | tools/perf/benchmarks/indexeddb_perf.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698