Skip to content

Commit

Permalink
Revert "feat: Update WriteSubRead benchmark to invalidate random keys…
Browse files Browse the repository at this point in the history
… (instead of a fixed set) (#672)" (#673)

This reverts commit c072880.
  • Loading branch information
grgbkr authored Nov 8, 2021
1 parent c072880 commit 5a402ab
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 117 deletions.
109 changes: 0 additions & 109 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
},
"devDependencies": {
"@esm-bundle/chai": "^4.3.4",
"@types/lodash.range": "^3.2.6",
"@types/lodash.samplesize": "^4.2.6",
"@types/mocha": "^8.2.2",
"@types/sinon": "^10.0.3",
"@types/web-locks-api": "^0.0.1",
Expand All @@ -39,8 +37,6 @@
"fetch-mock": "^9.11.0",
"get-port": "^5.1.1",
"idb": "^6.1.4",
"lodash.range": "^3.2.0",
"lodash.samplesize": "^4.2.0",
"navigator.locks": "^0.8.1",
"playwright": "^1.15.0",
"prettier": "^2.4.1",
Expand Down
6 changes: 2 additions & 4 deletions perf/replicache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ import {
} from '../src/mod';
import {jsonArrayTestData, TestDataObject, jsonObjectTestData} from './data';
import type {Bencher, Benchmark} from './perf';
import range from 'lodash.range';
import sampleSize from 'lodash.samplesize';

export function benchmarkPopulate(opts: {
numKeys: number;
Expand Down Expand Up @@ -238,8 +236,8 @@ export function benchmarkWriteSubRead(opts: {
// Build our random changes ahead of time, outside the timed window.
// invalidate numSubsDirty different subscriptions by writing to the first key each is scanning.
const changes = new Map(
sampleSize(range(numSubsTotal), numSubsDirty).map(v => [
sortedKeys[v * keysPerSub],
Array.from({length: numSubsDirty}).map((_, i) => [
sortedKeys[i * keysPerSub],
jsonObjectTestData(valueSize),
]),
);
Expand Down

0 comments on commit 5a402ab

Please sign in to comment.