Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase log interest #265

Merged
merged 8 commits into from
Nov 17, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
sort by count
fredclausen committed Nov 17, 2023
commit 4e2e1bdf1a86a4792b2dc85ea44f237212f5e3d4
Original file line number Diff line number Diff line change
@@ -336,7 +336,12 @@ pub async fn print_stats(
// now print the frequencies, and show each as a percentage of the total_all_time

if let Some(f) = &frequencies {
for freq in f.lock().await.iter_mut() {
// sort the frequencies by count
if let Some(f) = &frequencies {
f.lock().await.sort_by(|a, b| b.count.cmp(&a.count));
}

for freq in f.lock().await.iter() {
let percentage: f64 = (freq.count as f64 / total_all_time_locked as f64) * 100.0;
output.push_str(
format!(