Commit d1d45a13 authored by cmumford@chromium.org's avatar cmumford@chromium.org

Deleted testSporadicWrites IndexedDB performance test.

These sporadic write tests introduced too much noise (too short a duration)
and were not a good measure of IndexedDB performance.

Note: This change will give the impression that IndexedDB performance has
improved when there was no actual improvement because we track the aggregate
test times.

BUG=367855,369683

Review URL: https://codereview.chromium.org/344683002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@278467 0039d316-1c4b-4281-b951-d872f2087c98
parent f8d55d3a
...@@ -69,25 +69,6 @@ var tests = [ ...@@ -69,25 +69,6 @@ var tests = [
// Read a sequence of an index into an object store via a key cursor. // Read a sequence of an index into an object store via a key cursor.
[testCursorReadsAndRandomWrites, kReadKeysOnly, kUseIndex, kDontWrite, [testCursorReadsAndRandomWrites, kReadKeysOnly, kUseIndex, kDontWrite,
kPlaceholderArg], 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. // Make a small bunch of batches of reads of the same keys from an object store.
[testReadCache, 10, kDontUseIndex], [testReadCache, 10, kDontUseIndex],
// Make a bunch of batches of reads of the same keys from an index. // Make a bunch of batches of reads of the same keys from an index.
...@@ -448,81 +429,6 @@ function testCursorReadsAndRandomWrites( ...@@ -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) { function testWalkingMultipleCursors(numCursors, onTestComplete) {
var numKeys = 1000; var numKeys = 1000;
var numHitsPerKey = 10; var numHitsPerKey = 10;
......
...@@ -12,7 +12,6 @@ Indexes: ...@@ -12,7 +12,6 @@ Indexes:
create/delete create/delete
Data access: Data access:
Random read/write Random read/write
Sporadic writes
Read cache Read cache
Cursors: Cursors:
Read & random writes Read & random writes
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment