We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
need to implement BlockClosure>>bench. Here's the Pharo implementation:
bench "Return how many times the receiver can get executed in 5 seconds. Answer a meaningful description." "[3.14 printString] bench" | startTime endTime count roundTo3Digits | roundTo3Digits := [:num | | rounded lowDigit | rounded := (num * 1000) rounded. "round to 1/1000" lowDigit := (rounded numberOfDigitsInBase: 10) - 3. "keep only first 3 digits" rounded := rounded roundTo:(10 raisedTo: lowDigit). (lowDigit >= 3 or: [rounded \\ 1000 = 0]) "display fractional part only when needed" ifTrue: [(rounded // 1000) asStringWithCommas] ifFalse: [(rounded / 1000.0) printString]]. count := 0. endTime := Time millisecondClockValue + 5000. self assert: endTime < SmallInteger maxVal. startTime := Time millisecondClockValue. [ Time millisecondClockValue > endTime ] whileFalse: [ self value. count := count + 1 ]. endTime := Time millisecondClockValue. ^count = 1 ifTrue: [ (roundTo3Digits value: (endTime - startTime) / 1000) , ' seconds.' ] ifFalse: [ (roundTo3Digits value: (count * 1000) / (endTime - startTime)) , ' per second.' ]
This probably deserves to be in GsDevKit base, but I'm working on Issue #53 right now ...
The text was updated successfully, but these errors were encountered:
Issue #53: barring any new sent but not implmented messages, this bug…
a9aaa40
… should be fixed .... of course Issue #61 and Issue #62 were opened to implement the missing behavior
Merge pull request #62 from mumez/feature/sse-logging-fix
7f3502b
Fixed ZnServerSentEvent>>writeOn: to use the latest Zn logging API
No branches or pull requests
need to implement BlockClosure>>bench. Here's the Pharo implementation:
This probably deserves to be in GsDevKit base, but I'm working on Issue #53 right now ...
The text was updated successfully, but these errors were encountered: