Link graph: Fix FlowStat::ScaleToMonthly scaling

Fixes: e1cce4d9
This commit is contained in:
Jonathan G Rennison
2023-07-03 01:14:57 +01:00
parent e1cce4d9f7
commit 51a66b9590
2 changed files with 3 additions and 3 deletions

View File

@@ -53,7 +53,7 @@ void FlowMapper::Run(LinkGraphJob &job) const
/* Scale by time the graph has been running without being compressed. Add 1 to avoid
* division by 0 if spawn date == last compression date. This matches
* LinkGraph::Monthly(). */
uint runtime = (job.StartDateTicks() / DAY_TICKS) - job.LastCompression() + 1;
uint runtime = _scaled_date_ticks - job.LastCompression() + 1;
for (auto &it : flows) {
it.ScaleToMonthly(runtime);
}