-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
libfuzzer: Track the rate of fuzzing in cycles/s. #21025
Conversation
This statistic can be entierly calculated on the webui instead of calculating it in the fuzz process if you make the webserver send periodic updates instead of only on new unique input like it is now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, it should be calculated client side.
As libfuzzer develops or as users design their own fuzz tests which use libfuzzer, it will be essential to understand the performance impact of changes. This change tracks the rate of execution in terms of cycles per second and updates the UI at most every second. This is implemented with a periodic update to the web UI which occurs at least every 1 second. The period is not guaranteed to be regular.
last_cycle_timed.* = n_runs; | ||
|
||
try web_socket.writeMessage(std.mem.asBytes(&abi.PeriodicUpdateHeader{ | ||
.cycles_per_second = cycles_per_second, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it should be calculated client side.
the only additional thing that needs to be sent by the server is two pieces of static data that are already known when the connection is made:
- what time the server thinks it currently is
- what time according to the server fuzzing started
then the client can do the calculation based on what time it is currently and the number of runs.
As libfuzzer develops or as users design their own fuzz tests which use libfuzzer, it will be essential to understand the performance impact of changes. This change tracks the rate of execution in terms of cycles per second and updates the UI at most every second.