Skip to content

#7 Adds sorting functionality for connections statistics#26

Open
gintsgints wants to merge 2 commits intomainfrom
#7
Open

#7 Adds sorting functionality for connections statistics#26
gintsgints wants to merge 2 commits intomainfrom
#7

Conversation

@gintsgints
Copy link
Collaborator

No description provided.

println!(" {count:>6} {appname}");
let mut entries: Vec<_> = self.connection_attempts_by_time_bucket.iter().collect();
entries.sort_by(|a, b| b.1.cmp(a.1));
for (bucket, count) in entries {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Connections by time bucket:" would need some kind of "top" limit still not to overflow the viewport for large logfiles (20 time slots maybe?). Looks good otherwise! @gintsgints

Image

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I imagine three options here:

  • leave this to user to pipe output to more
  • implement option --limit for top command
  • rework this to be TUI application (like TOP :) )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants