Is it prossible to report how many calculations where executed by a section of code?
I know the benchmark gem will report on runtime, but don't believe it'll count the number of calculations done.
Just to be clear, I'm talking about at the processor level.
About memory usage, if you define the macro CALC_EXACT_MALLOC_SIZE (not sure where, but in ruby.h may work) and recompile Ruby, you will be able to call GC.malloc_allocated_size to know how much memory is allocated by malloc (almost everything), in bytes.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With