Fix calculation of daily load (#3516)

* Fix calculation of daily load

* Daily load in reviews/day
This commit is contained in:
user1823 2024-10-26 14:35:01 +05:30 committed by GitHub
parent fe0f5370b0
commit 7500beaba3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 7 deletions

View file

@ -26,17 +26,14 @@ impl GraphsContext {
due - (self.days_elapsed as i32) due - (self.days_elapsed as i32)
}; };
daily_load += 1.0 / c.interval.max(1) as f32;
// still want to filtered out buried cards that are due today // still want to filtered out buried cards that are due today
if due_day == 0 && matches!(c.queue, CardQueue::UserBuried | CardQueue::SchedBuried) { if due_day == 0 && matches!(c.queue, CardQueue::UserBuried | CardQueue::SchedBuried) {
continue; continue;
} }
have_backlog |= due_day < 0; have_backlog |= due_day < 0;
*due_by_day.entry(due_day).or_default() += 1; *due_by_day.entry(due_day).or_default() += 1;
if matches!(c.queue, CardQueue::Review | CardQueue::DayLearn) {
daily_load += 1.0 / c.interval.max(1) as f32;
} else {
daily_load += 1.0;
}
} }
FutureDue { FutureDue {
future_due: due_by_day, future_due: due_by_day,

View file

@ -145,8 +145,8 @@ export function buildHistogram(
}, },
{ {
label: tr.statisticsDailyLoad(), label: tr.statisticsDailyLoad(),
value: tr.statisticsReviews({ value: tr.statisticsReviewsPerDay({
reviews: sourceData.dailyLoad, count: sourceData.dailyLoad,
}), }),
}, },
]; ];