Skip to content

Commit 0c5a0b8

Browse files
authored
fix: calculation to monthly usage (#1123)
1 parent 058aad4 commit 0c5a0b8

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

‎src/hooks/useMonthlyTotalExecutionCount.test.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,8 @@ async function renderExecutionCountHook(checks?: Check[]) {
3535
}
3636

3737
const FREQUENCY = 60000;
38-
const FREQUENCY_SECONDS = FREQUENCY / 1000;
3938
const PROBES = [PRIVATE_PROBE.id!];
40-
const EXECUTIONS = getTotalChecksPerMonth(PROBES.length, FREQUENCY_SECONDS);
39+
const EXECUTIONS = getTotalChecksPerMonth(PROBES.length, FREQUENCY);
4140

4241
describe('calculates execution count correctly', () => {
4342
test('handles calculation for 1 active check correctly', async () => {

‎src/hooks/useMonthlyTotalExecutionCount.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export function useMonthlyTotalExecutionCount() {
77

88
const data = checks
99
.filter((check) => check.enabled)
10-
.reduce((total, check) => total + getTotalChecksPerMonth(check.probes.length, check.frequency / 1000), 0);
10+
.reduce((total, check) => total + getTotalChecksPerMonth(check.probes.length, check.frequency), 0);
1111

1212
return {
1313
data,

0 commit comments

Comments
 (0)