-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Conversation
@@ -57,7 +57,7 @@ impl VerificationQueueInfo { | |||
} | |||
|
|||
/// An unverified block. | |||
#[derive(PartialEq, Debug, MallocSizeOf)] | |||
#[derive(Clone, PartialEq, Debug, MallocSizeOf)] |
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.
Clone
is used for benchmarks/tests?
Why not #[cfg_attr(any(foo, bar), derive(Clone)]
?
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.
Yes, that is the reason. It's more convenience than necessity though. In general though, why is it bad to derive Clone
? Reading https://rust-lang-nursery.github.io/api-guidelines/interoperability.html#c-common-traits it seems idiomatic to do so whenever it's convenient?
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.
nothing bad I guess but it might have the reasoning that such big structures should not be cloned which are enforced by rustc
when no Clone impl exists
but I don't know really just guessing!
EDIT: It would produce a slightly bigger binary I guess but so small that it is probably negligible
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.
You probably want to revert all unintended changes as @niklasad1 pointed out.
Revert unwanted changes Tweak CI benchmark checks
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.
Good stuff
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.
👍
* master: (70 commits) ethcore: remove `test-helper feat` from build (#11047) Include test-helpers from ethjson (#11045) [ethcore]: cleanup dependencies (#11043) add more tx tests (#11038) Fix parallel transactions race-condition (#10995) [ethcore]: make it compile without `test-helpers` feature (#11036) Benchmarks for block verification (#11035) Move snapshot related traits to their proper place (#11012) cleanup json crate (#11027) [spec] add istanbul test spec (#11033) [json-spec] make blake2 pricing spec more readable (#11034) Add blake2_f precompile (#11017) Add new line after writing block to hex file. (#10984) fix: remove unused error-chain (#11028) fix: remove needless use of itertools (#11029) Convert `std::test` benchmarks to use Criterion (#10999) Fix block detail updating (#11015) [trace] introduce trace failed to Ext (#11019) cli: update usage and version headers (#10924) [private-tx] remove unused rand (#11024) ...
Uses real blocks from mainnet to benchmark the
verify_*
family of methodsin the
verification
module.NOTE the functions benchmarked here are
pub
but the module is not exposed publicly. To work around this it is necessary to run the benchmarks withcargo bench --features=bench
. Prior art.Results:
Also exposes the
TestBlockChain
in a test helper.