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

Real time coverage report chart #45

Open
aviggiano opened this issue Apr 4, 2024 · 1 comment
Open

Real time coverage report chart #45

aviggiano opened this issue Apr 4, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@aviggiano
Copy link

Describe the desired feature

I would like to get a coverage report chart by parsing Echidna/Medusa logs

Example

echidna . --target CryticTester --config echidna.yaml | fuzz-utils --chart

image
(Source)

or

medusa fuzz | fuzz-utils --chart

Also:

[I] ➜ cat /tmp/echidna.log
[2024-04-04 14:27:49.59] Compiling CryticTester.sol... Done! (0.799778s)
Analyzing contract: CryticTester.sol:CryticTester
[2024-04-04 14:27:53.46] Running slither on CryticTester.sol... Done! (0.939738s)
Loaded 0 transaction sequences from echidna/reproducers
Loaded 0 transaction sequences from echidna/coverage
[2024-04-04 14:27:54.41] [Worker 6] New maximum value of echidna_optimize_extracted_profit: 0
[2024-04-04 14:27:54.41] [Worker 2] New maximum value of echidna_optimize_extracted_profit: 0
[2024-04-04 14:27:54.41] [Worker 3] New maximum value of echidna_optimize_extracted_profit: 0
[2024-04-04 14:27:54.41] [Worker 7] New maximum value of echidna_optimize_extracted_profit: 0
[2024-04-04 14:27:54.41] [Worker 0] New maximum value of echidna_optimize_extracted_profit: 0
[2024-04-04 14:27:54.41] [Worker 4] New maximum value of echidna_optimize_extracted_profit: 0
[2024-04-04 14:27:54.41] [Worker 5] New maximum value of echidna_optimize_extracted_profit: 0
[2024-04-04 14:27:57.41] [status] tests: 0/1, fuzzing: 0/1000000, values: [0], cov: 2136, corpus: 0
[2024-04-04 14:28:00.41] [status] tests: 0/1, fuzzing: 0/1000000, values: [0], cov: 3053, corpus: 0
[2024-04-04 14:28:03.41] [status] tests: 0/1, fuzzing: 0/1000000, values: [0], cov: 3874, corpus: 0
[2024-04-04 14:28:06.41] [status] tests: 0/1, fuzzing: 0/1000000, values: [0], cov: 4086, corpus: 0
[2024-04-04 14:28:09.41] [status] tests: 0/1, fuzzing: 0/1000000, values: [0], cov: 4122, corpus: 0
[2024-04-04 14:28:12.47] [status] tests: 0/1, fuzzing: 0/1000000, values: [0], cov: 4682, corpus: 0
[2024-04-04 14:28:15.47] [status] tests: 0/1, fuzzing: 0/1000000, values: [0], cov: 5026, corpus: 0
[2024-04-04 14:28:18.86] [status] tests: 0/1, fuzzing: 0/1000000, values: [0], cov: 5542, corpus: 0
[2024-04-04 14:28:20.31] [Worker 7] New coverage: 5542 instr, 5 contracts, 1 seqs in corpus
[2024-04-04 14:28:20.63] [Worker 5] New coverage: 5542 instr, 5 contracts, 2 seqs in corpus
[2024-04-04 14:28:21.05] [Worker 2] New coverage: 5542 instr, 5 contracts, 3 seqs in corpus
[2024-04-04 14:28:21.86] [status] tests: 0/1, fuzzing: 303/1000000, values: [0], cov: 5542, corpus: 3

[I] ➜ tail -f /tmp/echidna.log | fuzz-utils --chart
@aviggiano aviggiano added the enhancement New feature or request label Apr 4, 2024
@ggrieco-tob
Copy link
Member

Uhm, I think that with our current infrastructure, it is hard to produce a plot like this that is not misleading. The reason is that we only keep track of the number of elements in the corpus, which is only somehow correlated with coverage. We need to have better logging of the PC reached, but perhaps at the expense of performance. We should be better prepared when this is merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants