RCasatta / blocks_iterator

Iterate over bitcoin blocks
MIT License
51 stars 5 forks source link

Bench as a standalone iterator step. #48

Open RCasatta opened 2 years ago

RCasatta commented 2 years ago

That's why I had benching as a standalone iterator step.

https://github.com/dpc/block-iter/blob/40578bb5eca918e7570b8ab82370ee88cebb7a9f/libs/main/src/bench.rs#L6

so one can insert .bench_x() at the end of a middle of an iterator chain and get stats. Though I now see that I forgot to make the bench_x be an iterator that returns the items it's benching, so right now it only works at the end, as a sort of of a .for_each() or .count().

_Originally posted by @dpc in https://github.com/RCasatta/blocks_iterator/issues/42#issuecomment-1107527823_