-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Optionaly show stats during fuzzing session
- Loading branch information
Showing
16 changed files
with
238 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -71,3 +71,4 @@ pathdiff = "0.2.1" | |
solana-banks-client = "<1.18" | ||
indicatif = "0.17.8" | ||
regex = "1.10.3" | ||
solana-logger = "<1.18" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
use std::collections::HashMap; | ||
|
||
#[derive(Debug)] | ||
pub struct AccumulatedStats { | ||
pub executed: u64, | ||
pub successful: u64, | ||
} | ||
|
||
#[derive(Debug, Default)] | ||
pub struct Stats { | ||
pub accumulated_stats: HashMap<String, AccumulatedStats>, | ||
pub iterations: u64, | ||
} | ||
|
||
pub trait StatsLogger { | ||
/// Accumulate number of invocations for corresponding instruction | ||
fn accumulate_executed_ix(&mut self, ix: String); | ||
/// Accumulate number of successful invocations for corresponding instruction | ||
fn accumulate_successful_ix(&mut self, ix: String); | ||
/// Show the Accumulated stats | ||
fn show_accumulated_stats(&mut self); | ||
/// Increase number of iterations | ||
fn increase_iterrations(&mut self); | ||
/// Return if show stats are enabled | ||
fn allow_stats(&self) -> bool; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.