Skip to content

Commit 7d4bddf

Browse files
committed
Lower sample size to 1000
1 parent fcf2c29 commit 7d4bddf

4 files changed

Lines changed: 4 additions & 4 deletions

File tree

backend/main/DownloadLog.mo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ module {
431431
dailyTempRecords : { count : Nat; bytes : Nat };
432432
weeklyTempRecords : { count : Nat; bytes : Nat };
433433
} {
434-
let SAMPLE_SIZE : Nat = 10_000;
434+
let SAMPLE_SIZE : Nat = 1_000;
435435

436436
func sampleDownloadsMapBytes(map : TrieMap.TrieMap<Text.Text, Nat>) : Nat {
437437
let total = map.size();

backend/main/Users.mo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ module {
2929
users : { count : Nat; bytes : Nat };
3030
names : { count : Nat; bytes : Nat };
3131
} {
32-
let SAMPLE_SIZE : Nat = 10_000;
32+
let SAMPLE_SIZE : Nat = 1_000;
3333

3434
let usersTotal = _users.size();
3535
let usersStride = if (usersTotal <= SAMPLE_SIZE) 1 else (usersTotal + SAMPLE_SIZE - 1) / SAMPLE_SIZE;

backend/main/main-canister.mo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -621,7 +621,7 @@ actor class Main() = this {
621621
storageManager.getStoragesStats();
622622
};
623623

624-
let SAMPLE_SIZE : Nat = 10_000;
624+
let SAMPLE_SIZE : Nat = 1_000;
625625

626626
// Serializes a random sample of up to SAMPLE_SIZE entries and extrapolates
627627
// the total byte count, keeping to_candid allocations bounded.

backend/storage/storage-manager.mo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ module {
176176
storages : { count : Nat; bytes : Nat };
177177
storageByFileId : { count : Nat; bytes : Nat };
178178
} {
179-
let SAMPLE_SIZE : Nat = 10_000;
179+
let SAMPLE_SIZE : Nat = 1_000;
180180

181181
func sampleStoragesBytes() : Nat {
182182
let total = storages.size();

0 commit comments

Comments
 (0)