Rizel-Spy-Profiler

It collects a number of metrics by method

  • Number of executions
  • execution time
  • incoming calls
  • outgoing calls
  • bytecode
  • source code
  • static structure of packages, classes and methods

It use two of techniques to collect data: code instrumentation (using AOP) and execution sampling (MessageTally). Next step, comparing two profiles!!!

Rizel-Builder classes

  • RzProfilerSpy
  • RzProfilerPackage
  • RzProfilerClass
  • RzProfilerMethod

Rizel-Spy-Profiler dependences

Sample Code

RzProfilerSpyTests>>testExecutionTime
 |profile image time|
 image := RSImageFile named: 'TestImage.jpg' size: 10.
 profile := RzProfilerSpy profile: [
   image open.
   ] inClassCategory:'Rizel-Test-Scenario'.
 time := (profile>>#RSImageFile>>#open) executionTime.
 self assert: ( time > 190).
 self assert: ( time < 250).

Sample Code 2

RzProfilerSpyTests>>testNumberOfExecution
 |profile image time|
 image := RSImageFile named: 'TestImage.jpg' size: 10.
 profile := RzProfilerSpy profile: [
   10 timesRepeat:[image size].
   ] inClassCategory:'Rizel-Test-Scenario'.
 time := (profile>>#RSImageFile>>#open) executionTime.
 self self assert: ( (profile>>#RSFile>>#size) numberOfExecutions =10).