https://pharo.fogbugz.com/f/cases/21232/BenchmarkResult-printFrequencyOn-can-be-confusing
https://github.com/pharo-project/pharo/pull/794 > On 12 Dec 2017, at 07:22, Stephane Ducasse <[email protected]> wrote: > > sven did you submit a fix to get a clearer printout? > > Stef > > > On Sun, Dec 10, 2017 at 7:14 PM, Sven Van Caekenberghe <[email protected]> wrote: >> @ Henrik >> >> Arg, arg, arg, yes of course. >> I actually did think about that, but still did not look carefully enough !! >> Really stupid of me. >> >> It is even worse because I wrote that code ... >> >> Now, the #printOn: of BenchmarkResult is much clearer, less confusing: >> >> ZnClient new in: [ :client | >> [ client get: 'http://localhost:8080' ] benchFor: 5 seconds ]. >> >> a BenchmarkResult(14,732 iterations in 5 seconds. 2,946 per second) >> >> vs >> >> ZnClient new in: [ :client | >> client loggingOff. >> [ client get: 'http://localhost:8080' ] benchFor: 5 seconds ]. >> >> a BenchmarkResult(42 iterations in 5 seconds 88 milliseconds. 8.255 per >> second) >> >> Still the same issue with $, and $. in frequency, but the iteration count is >> crystal clear. >> >> The reason #bench works like that is backwards compatibility at the time we >> introduced that. >> >> @ Ben >> >> Yes, I should have looked at the other side as well, to confirm things >> actually happened as I imagined them (the did not). >> >> Thx and sorry for the noise. >> >> Sven >> >>> On 10 Dec 2017, at 18:00, Henrik-Nergaard <[email protected]> wrote: >>> >>> Hi Sven, >>> >>> What you are seeing is most likely a $, vs $. issue. >>> See BenchmarkResult >>#printFrequenceOn: it uses both decimal and thousand >>> separators. >>> >>> If i run this code: >>> ----------------------------------------- >>> | counter | >>> counter := >>> ZnClient new in: [ :client | >>> client loggingOff. >>> [ client get: 'http://localhost:8080'. counter ] bench >>> ]. >>> counter. >>> ----------------------------------------- >>> >>> Then i get 9035 ('1,773 per second') when no inspector is open, and only 22 >>> ('5.995 per second') when inspecting the logs. >>> >>> Best regards, >>> Henrik >>> >>> >>> >>> >>> >>> >>> >>> >>> -- >>> Sent from: http://forum.world.st/Pharo-Smalltalk-Developers-f1294837.html >>> >> >> >
