The Inbox: ShoutCore-ct.72.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Inbox: ShoutCore-ct.72.mcz

commits-2
A new version of ShoutCore was added to project The Inbox:
http://source.squeak.org/inbox/ShoutCore-ct.72.mcz

==================== Summary ====================

Name: ShoutCore-ct.72
Author: ct
Time: 4 September 2019, 10:08:56.059698 pm
UUID: f93fd19c-7a5e-c945-821d-9ff30737d01c
Ancestors: ShoutCore-ct.71

Use Time>>#utcMicrosecondClock instead of #primUTCMicrosecondClock or TimeStamps

Thanks tim :)

=============== Diff against ShoutCore-ct.71 ===============

Item was changed:
  ----- Method: SHParserST80 class>>benchmark (in category 'benchmarking') -----
  benchmark
 
  | methods methodCount totalTime averageTime min median percentile80 percentile95 percentile99 max |
  Smalltalk garbageCollect.
  methods := OrderedCollection new: 100000.
  CurrentReadOnlySourceFiles cacheDuring: [
  | parser |
  parser := SHParserST80 new.
  SystemNavigation default allSelectorsAndMethodsDo: [ :class :selector :method |
  | source start ranges |
  source := method getSource asString.
+ start := Time utcMicrosecondClock.
- start := TimeStamp now.
  ranges := parser
  rangesIn: source
  classOrMetaClass: class
  workspace: nil
  environment: nil.
+ methods addLast: { Time utcMicrosecondClock - start. method. ranges size } ] ].
- methods addLast: { (TimeStamp now - start) asMicroSeconds. method. ranges size } ] ].
  methods sort: #first asSortFunction.
  methodCount := methods size.
  totalTime := methods detectSum: #first.
  averageTime := (totalTime / methodCount) rounded.
 
  min := methods first.
  median := methods at: methodCount // 2.
  percentile80 := methods at: (methodCount * 0.8) floor.
  percentile95 := methods at: (methodCount * 0.95) floor.
  percentile99 := methods at: (methodCount * 0.99) floor.
  max := methods last.
  ^'
  Methods {1}
  Total {2}ms
  Average {3}ms
  Min {4}ms {5} range(s) ({6})
  Median {7}ms {8} ranges ({9})
  80th percentile {10}ms {11} ranges ({12})
  95th percentile {13}ms {14} ranges ({15})
  99th percentile {16}ms {17} ranges ({18})
  Max {19}ms {20} ranges ({21})' format: ({
  methodCount asString.
  totalTime.
  averageTime.
  min first.
  min third asString.
  min second reference.
  median first.
  median third asString.
  median second reference.
  percentile80 first.
  percentile80 third asString.
  percentile80 second reference.
  percentile95 first.
  percentile95 third asString.
  percentile95 second reference.
  percentile99 first.
  percentile99 third asString.
  percentile99 second reference.
  max first.
  max third asString.
  max second reference } replace: [ :each |
  each isNumber
  ifTrue: [ (each / 1000) printShowingDecimalPlaces: 3 ]
  ifFalse: [ each ] ])!