Hi, is there any benchmark library for Pharo ? that would provide tools to choose metrics to measure between two versions of the same code and maybe display a comparison or something (whatever the form of the report) ? I've found BenchmarkResult in Pharo but it seems very basic, at least there are no detailed examples of how it could be used. I'm specifically looking for a way to measure the speed of method calls (if that is possible) or the memory usage, but i'm also curious in general about what is measureable and try different benchmarks to see the results. So if there were a tool already doing all this work... ? Steven.
|
Check Smark and clement and vm guys has a lot of benchmarks On Thu, May 25, 2017 at 12:51 PM, Steven Costiou <[hidden email]> wrote:
|
In reply to this post by Steven Costiou-2
You can do things like: MessageTally spyOn: [ 1 to: 1000 do: [ :i | i primeFactors logCr ] ]. or AndreasSystemProfiler spyOn: [ 1 to: 1000 do: [ :i | i primeFactors logCr ] ]. or [ 1000 primeFactors ] benchFor: 5 seconds --> "a BenchmarkResult(11,386,117 iterations in 5 seconds. 2,277,223 per second)" or [ 1000000 timesRepeat: [ 1000 primeFactors ] ] timeToRun --> "0:00:00:01.055" etc. http://www.smalltalkhub.com/#!/~StefanMarr/SMark is also interesting and more like a framework. ZnBase64EncoderTests class side has a few bench methods: bench10kEncode "self bench10kEncode" | bytes | bytes := ByteArray new: 10240 streamContents: [ :out | 10240 timesRepeat: [ out nextPut: 256 atRandom - 1 ] ]. ^ [ ZnBase64Encoder new encode: bytes ] bench There is also this chapter: http://pharobooks.gforge.inria.fr/PharoByExampleTwo-Eng/latest/Profiling.pdf HTH Phil On Thu, May 25, 2017 at 12:51 PM, Steven Costiou <[hidden email]> wrote:
|
In reply to this post by Steven Costiou-2
On Thu, May 25, 2017 at 6:51 PM, Steven Costiou <[hidden email]> wrote:
> Hi, > > is there any benchmark library for Pharo ? that would provide tools to > choose metrics to measure between two versions of the same code and maybe > display a comparison or something (whatever the form of the report) ? > > I've found BenchmarkResult in Pharo but it seems very basic, at least there > are no detailed examples of how it could be used. > > I'm specifically looking for a way to measure the speed of method calls (if > that is possible) or the memory usage, but i'm also curious in general about > what is measureable and try different benchmarks to see the results. So if > there were a tool already doing all this work... ? > > Steven. I think not quite what you want but may be interesting... http://forum.world.st/A-Benchmarking-tool-for-the-trunk-td4892463.html http://forum.world.st/Call-for-big-benchmarks-td4939568.html cheers -ben |
In reply to this post by Steven Costiou-2
Thank you all for your answers :) I will have a look into all that :) Steven. |
Free forum by Nabble | Edit this page |