mirror of
https://github.com/Lissy93/web-check.git
synced 2025-02-03 03:59:12 +01:00
Fixes changes per day / scan calculation
This commit is contained in:
parent
56ee47fef4
commit
d38f2ae384
@ -36,8 +36,8 @@ const getScanFrequency = (firstScan, lastScan, totalScans, changeCount) => {
|
|||||||
const dayFactor = (lastScan - firstScan) / (1000 * 60 * 60 * 24);
|
const dayFactor = (lastScan - firstScan) / (1000 * 60 * 60 * 24);
|
||||||
const daysBetweenScans = formatToTwoDecimal(dayFactor / totalScans);
|
const daysBetweenScans = formatToTwoDecimal(dayFactor / totalScans);
|
||||||
const daysBetweenChanges = formatToTwoDecimal(dayFactor / changeCount);
|
const daysBetweenChanges = formatToTwoDecimal(dayFactor / changeCount);
|
||||||
const scansPerDay = formatToTwoDecimal((totalScans - 1) / daysBetweenScans);
|
const scansPerDay = formatToTwoDecimal((totalScans - 1) / dayFactor);
|
||||||
const changesPerDay = formatToTwoDecimal(changeCount / daysBetweenScans);
|
const changesPerDay = formatToTwoDecimal(changeCount / dayFactor);
|
||||||
return {
|
return {
|
||||||
daysBetweenScans,
|
daysBetweenScans,
|
||||||
daysBetweenChanges,
|
daysBetweenChanges,
|
||||||
|
Loading…
Reference in New Issue
Block a user