Skip to content

Commit

Permalink
add more comments
Browse files Browse the repository at this point in the history
  • Loading branch information
taikiy committed Nov 8, 2023
1 parent 3a5c130 commit 62e5139
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/test_fixture/event_gen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ pub enum ReportFilter {
#[derive(Debug, Clone)]
#[cfg_attr(feature = "clap", derive(clap::Args))]
pub struct Config {
/// Number of unique users per event generator. The generator will generate events
/// for at most this many users.
#[cfg_attr(feature = "clap", arg(long, default_value = "1000000000000"))]
pub user_count: NonZeroU64,
#[cfg_attr(feature = "clap", arg(long, default_value = "5"))]
Expand Down Expand Up @@ -97,6 +99,8 @@ impl Config {
}
}

/// Returns the number of unique users per event generator. The generator will generate
/// events for at most this many users.
fn user_count(&self) -> usize {
usize::try_from(self.user_count.get()).unwrap()
}
Expand Down

0 comments on commit 62e5139

Please sign in to comment.