pub struct BenchAssert { /* private fields */ }Expand description
Measure the compilation time for the assert! macro
For context of an average large project:
egrep -r "assert[!_]" . | wc -l
bevy: 7,000 wasm-bindgen: 3,000 rust: 50,000
§Expect
10 lines of ‘expect’ comilied in 0.53s, each line added 53.00ms 100 lines of ‘expect’ comilied in 0.47s, each line added 4.70ms 1000 lines of ‘expect’ comilied in 0.49s, each line added 0.49ms 2000 lines of ‘expect’ comilied in 0.50s, each line added 0.25ms 3000 lines of ‘expect’ comilied in 0.53s, each line added 0.18ms 5000 lines of ‘expect’ comilied in 0.56s, each line added 0.11ms 10000 lines of ‘expect’ comilied in 0.70s, each line added 0.07ms * consistency starts here 100000 lines of ‘expect’ comilied in 5.37s, each line added 0.05ms 20000 lines of ‘expect’ comilied in 1.06s, each line added 0.05ms 500000 lines of ‘expect’ comilied in 44.00s, each line added 0.09ms
§Assert
10 lines of ‘assert’ comilied in 0.21s, each line added 21.00ms 100 lines of ‘assert’ comilied in 0.23s, each line added 2.30ms 1000 lines of ‘assert’ comilied in 1.54s, each line added 1.54ms * smallest 2000 lines of ‘assert’ comilied in 4.92s, each line added 2.46ms 3000 lines of ‘assert’ comilied in 11.61s, each line added 3.87ms 5000 lines of ‘assert’ comilied in 26.96s, each line added 5.39ms * consistency starts here 10000 lines of ‘assert’ comilied in 55.00s, each line added 5.50ms 20000 lines of ‘expect’ comilied in 1.06s, each line added 0.05ms * this is incorrect, it actually took 10 mins 100000… no way dude
Implementations§
Trait Implementations§
Source§impl Args for BenchAssert
impl Args for BenchAssert
Source§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
Source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§impl CommandFactory for BenchAssert
impl CommandFactory for BenchAssert
Source§impl Debug for BenchAssert
impl Debug for BenchAssert
Source§impl FromArgMatches for BenchAssert
impl FromArgMatches for BenchAssert
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§impl Parser for BenchAssert
impl Parser for BenchAssert
Source§fn parse_from<I, T>(itr: I) -> Self
fn parse_from<I, T>(itr: I) -> Self
Source§fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
Source§fn update_from<I, T>(&mut self, itr: I)
fn update_from<I, T>(&mut self, itr: I)
Auto Trait Implementations§
impl Freeze for BenchAssert
impl RefUnwindSafe for BenchAssert
impl Send for BenchAssert
impl Sync for BenchAssert
impl Unpin for BenchAssert
impl UnwindSafe for BenchAssert
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more