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

Enhanced TuiMonitor display to include Current Testcase Index and use… #2810

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

devratapuri
Copy link

Fixes : #2757 (comment)

Description :
This PR enhances the TuiMonitor to display the "Current Testcase Index" and user-defined stats in the display method. These updates improve usability by providing more detailed real-time insights into the monitoring process.

@domenukk
Copy link
Member

domenukk commented Jan 5, 2025

Thanks! Can you cargo +nighlty fmt this? I'll take a look later.

if let Some(stat) = client.get_user_stats("Current Testcase Index") {
write!(fmt, ", Testcase Index: {}", stat.value()).unwrap();
} else {
write!(fmt, ", Testcase Index: N/A").unwrap();
Copy link
Member

Choose a reason for hiding this comment

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

No need to show anything if it's not available.

Also, this only ends up in the log, not in the TUI, right?

Copy link
Author

Choose a reason for hiding this comment

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

Yes, this code update ensures that the "Testcase Index" information only ends up in the log, not in the TUI. ok will remove else

Copy link
Member

Choose a reason for hiding this comment

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

I think user stats already end up in the log (not 100% sure though)

Copy link
Member

Choose a reason for hiding this comment

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

(and really, it'd be nice to have this in the UI for the individual fuzzer, that's the idea of the tui, but we can do that in another PR)

Copy link
Author

Choose a reason for hiding this comment

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

i can try in this PR to add this in the UI for the individual fuzzer

let corpus_idx_value = corpus_idx.0; // Extract `usize` value from `CorpusId`

// Fire the UpdateUserStats event with the corpus index
_manager.fire(
Copy link
Member

@domenukk domenukk Jan 5, 2025

Choose a reason for hiding this comment

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

This should be optional (i.e., something you set in the builder), it may lead to a lot of events so slow down the fuzzer

Copy link
Author

Choose a reason for hiding this comment

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

ok thanks will look into this

@domenukk
Copy link
Member

Any news? :)

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.

Show currently fuzzed testcase to TUI
2 participants