Skip to content

Commit

Permalink
Database storage tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
joeldodge79 committed Jul 12, 2019
1 parent 06e21b4 commit 3bb4de4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions data_rows/DatabaseStorageUsageHistory.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,13 @@ export default class DatabaseStorageUsageHistory extends DataRow {
if (Math.random() < 0.1) {
const changeDegree = Math.random() * (0.2 - 0.05) + 0.05;
const change = Math.round(size * changeDegree);
if (Math.random() < 0.5) {
if (Math.random() < 0.3) {
size -= change;
} else {
size += change;
}
}
this.constructor._sizes[this.DATABASE_NAME] = size;
this.AVERAGE_DATABASE_BYTES = size;
}

Expand All @@ -53,7 +54,7 @@ export default class DatabaseStorageUsageHistory extends DataRow {
`Must call ${this.name}.initialize() only once`
);
}
const seedSizes = [1e12, 1e13, 1e14, 1e15];
const seedSizes = [1.1e15, 1.2e15, 1.3e15, 1.4e15];
const sizes = {};
for (const db of dbs) {
const seed = randomFromArray(seedSizes);
Expand Down

0 comments on commit 3bb4de4

Please sign in to comment.