Object-centric profiling:Advanced Visualizations to Tame Wild       Program Execution  Vanessa Peña, Juan Pablo Sandoval, P...
2
Execution profiling with KaiProblem:  Traditional code profilers are driven by the method stack, discarding the notion of se...
Execution sampling profiler54.8% {11501ms} MOCanvas>>drawOn:  54.8% {11501ms} MORoot(MONode)>>displayOn:   30.9% {6485ms} M...
Structural profiling blueprint                      legend for methods                                     # executions    ...
Behavioral profiling blueprint                         legend for methods                                        # executio...
Structural profiling blueprintbounds                           legend for methods                                          ...
Behavioral profiling blueprint                  legend for methods                                 # executions            ...
Code of the bounds methodMOGraphElement>>bounds "Answer the bounds of the receiver." | basicBounds | self shapeBoundsAt: s...
MemoizingMOGraphElement>>bounds "Answer the bounds of the receiver." | basicBounds | boundsCache ifNotNil: [ ^ boundsCache...
Upgrading        MOGraphElement>>boundsA    B                     C                                 11
43%speedup             Upgrading              MOGraphElement>>bounds      A          B                           C        ...
A      UpgradingMOGraphElement>>bounds                             B                                 13
B                  C                      A    cached                                                        makeabsoluteB...
B                  C                      A                                                          D    cached          ...
B                  C                      A                                                          D    cached          ...
Test coverage with HapaoProblem:  Traditional code coverage tools have a binary view of the worldWhy the problem is import...
Test blueprint       C1                   Legend for methods (inner boxes)                        # calling methods       ...
Successive improvementVersion 2.2   Version 2.3   Version 2.4   Version 2.5 27.27%        54.54%        87.71%         100...
4 patterns             20
Moose-Test-Core.13                                 Moose-Test-Core.48          Moose-Core.313                             ...
Reducing code complexity Version 1.58.1     Version 1.58.9Coverage: 40.57%   Coverage: 60.60%                             ...
Reducing code complexity        Version 2.10        Version 2.17                           23
Visualizing data with RoassalRoassal is an agile and interactive visualization engine
Visualizing Incidents at the Fire       Department of NY
Supported Platforms
Multidimentional profilingr methods                                                         XMLTokenizer>>nextNamer of exec...
Differences between tests
ConclusionLittle innovation in the tools we commonly use  Profilers, debuggers, testing tools have not significantly evolved...
Spy @ Cincom Store                                       Spy @ SqueakSource                                       Roassal ...
Object Centric Profiling
Upcoming SlideShare
Loading in …5
×

Object Centric Profiling

364 views
329 views

Published on

ESUG 2012, Ghent

Published in: Technology, Spiritual
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
364
On SlideShare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
3
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Object Centric Profiling

  1. 1. Object-centric profiling:Advanced Visualizations to Tame Wild Program Execution Vanessa Peña, Juan Pablo Sandoval, Pablo Estefo, Alexandre Bergel Object Profile & University of Chile
  2. 2. 2
  3. 3. Execution profiling with KaiProblem: Traditional code profilers are driven by the method stack, discarding the notion of sending messagesWhy the problem is important: How to answer to “Is there a slow function that is called too often?”Solution: An intuitive visual representation of the execution that visually compare the time spent and the number of executions 3
  4. 4. Execution sampling profiler54.8% {11501ms} MOCanvas>>drawOn: 54.8% {11501ms} MORoot(MONode)>>displayOn: 30.9% {6485ms} MONode>>displayOn: | 18.1% {3799ms} MOEdge>>displayOn: ... | 8.4% {1763ms} MOEdge>>displayOn: | | 8.0% {1679ms} MOStraightLineShape>>display:on: | | 2.6% {546ms} FormCanvas>>line:to:width:color: ... 23.4% {4911ms} MOEdge>>displayOn: ... 4
  5. 5. Structural profiling blueprint legend for methods # executions (color) execution #different time receiver 5
  6. 6. Behavioral profiling blueprint legend for methods # executions gray = side m1 m3 execution effect m1 time invokes yellow = m2 m2 and m3 no side effectDEMO 6
  7. 7. Structural profiling blueprintbounds legend for methods # executions (color) execution #different time receiver 7
  8. 8. Behavioral profiling blueprint legend for methods # executions gray = side m1 m3 execution effect m1 time invokes yellow = m2 m2 and m3bounds no side effect 8
  9. 9. Code of the bounds methodMOGraphElement>>bounds "Answer the bounds of the receiver." | basicBounds | self shapeBoundsAt: self shape ifPresent: [ :b | ^ b ]. basicBounds := shape computeBoundsFor: self. self shapeBoundsAt: self shape put: basicBounds. ^ basicBounds 9
  10. 10. MemoizingMOGraphElement>>bounds "Answer the bounds of the receiver." | basicBounds | boundsCache ifNotNil: [ ^ boundsCache ]. self shapeBoundsAt: self shape ifPresent: [ :b | ^ b ]. basicBounds := shape computeBoundsFor: self. self shapeBoundsAt: self shape put: basicBounds. ^ boundsCache := basicBounds 10
  11. 11. Upgrading MOGraphElement>>boundsA B C 11
  12. 12. 43%speedup Upgrading MOGraphElement>>bounds A B C 12
  13. 13. A UpgradingMOGraphElement>>bounds B 13
  14. 14. B C A cached makeabsoluteBounds call abs instead of ab A C B C 14
  15. 15. B C A D cached make display:on:absoluteBounds call absoluteBounds instead of absoluteBoundsFor: A C B C 15
  16. 16. B C A D cached make display:on:absoluteBounds call absoluteBounds instead of absoluteBoundsFor: A C B C 16
  17. 17. Test coverage with HapaoProblem: Traditional code coverage tools have a binary view of the worldWhy the problem is important: Which method should you test first in order to increase the coverage? Is my code well covered or not?Solution: An intuitive visual representation of a qualitative assessment of the coverage 17
  18. 18. Test blueprint C1 Legend for methods (inner boxes) # calling methods d complexity # executions c invocation on self C2 red = not executed blue = abstractDEMO 18
  19. 19. Successive improvementVersion 2.2 Version 2.3 Version 2.4 Version 2.5 27.27% 54.54% 87.71% 100% 19
  20. 20. 4 patterns 20
  21. 21. Moose-Test-Core.13 Moose-Test-Core.48 Moose-Core.313 Moose-Core.326 21.42% 100% 56.86% 100% 73.58% 100%68.25% 96.66% 36.78% 64.55% 0% 100% 21
  22. 22. Reducing code complexity Version 1.58.1 Version 1.58.9Coverage: 40.57% Coverage: 60.60% 22
  23. 23. Reducing code complexity Version 2.10 Version 2.17 23
  24. 24. Visualizing data with RoassalRoassal is an agile and interactive visualization engine
  25. 25. Visualizing Incidents at the Fire Department of NY
  26. 26. Supported Platforms
  27. 27. Multidimentional profilingr methods XMLTokenizer>>nextNamer of executions source code node red: change color black: do not change m1 # messages < than before # messages > than before m2 and m1 invokes m2 XMLNestedStreamReader>>atEnd # executions <= than before # messages > than before and # executions > than before # messages = than beforehis method did not exist before
  28. 28. Differences between tests
  29. 29. ConclusionLittle innovation in the tools we commonly use Profilers, debuggers, testing tools have not significantly evolvedFantastic opportunities for improvementKai, Hapao and Roassal are just a beginningFeel free to provide feedback on our tool 30
  30. 30. Spy @ Cincom Store Spy @ SqueakSource Roassal @ ... ObjectProfile.com Moose-Test-Core.13 Moose-Test-Core.48 Moose-Core.313 Moose-Core.326 21.42% 100%Thanks to 56.86% 100% ESUG Chris T 73.58% 100% Cincom All of you guys! 68.25% 36.78% 96.66% 64.55% 0% 100%

×