SlideShare a Scribd company logo
1 of 31
Download to read offline
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
Execution profiling with Kai


Problem:
  Traditional code profilers are driven by the method stack,
 discarding the notion of sending messages

Why 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
Execution sampling profiler


54.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
Structural profiling blueprint




                      legend for methods
                                     # executions




                                         (color)
                        execution
                                       #different
                          time
                                        receiver




                                                    5
Behavioral profiling blueprint




                         legend for methods
                                        # executions


                                           gray =
                                            side       m1     m3
                           execution       effect              m1
                             time                            invokes
                                          yellow =     m2   m2 and m3
                                          no side
                                           effect
DEMO                                                                    6
Structural profiling blueprint




bounds



                           legend for methods
                                          # executions




                                              (color)
                             execution
                                            #different
                               time
                                             receiver




                                                         7
Behavioral profiling blueprint




                  legend for methods
                                 # executions


                                    gray =
                                     side       m1     m3
                    execution       effect              m1
                      time                            invokes
                                   yellow =     m2   m2 and m3
bounds                             no side
                                    effect
                                                                 8
Code of the bounds method

MOGraphElement>>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
Memoizing

MOGraphElement>>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
Upgrading
        MOGraphElement>>bounds


A

    B
                     C




                                 11
43%
speedup             Upgrading
              MOGraphElement>>bounds


      A

          B
                           C




                                       12
A




      Upgrading
MOGraphElement>>bounds




                             B




                                 13
B                  C
                      A




    cached
                                                        make
absoluteBounds
                                                      call abs
                                                 instead of ab




                 A'

                                        C'



                                   B'




                              C'

                                             14
B                  C
                      A                                                          D




    cached
                                                        make display:on:
absoluteBounds
                                                      call absoluteBounds
                                                 instead of absoluteBoundsFor:




                 A'

                                        C'



                                   B'




                              C'

                                                                                     15
B                  C
                      A                                                          D




    cached
                                                        make display:on:
absoluteBounds
                                                      call absoluteBounds
                                                 instead of absoluteBoundsFor:




                 A'

                                        C'



                                   B'




                              C'

                                                                                     16
Test coverage with Hapao

Problem:
  Traditional code coverage tools have a binary view of the world

Why 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
Test blueprint

       C1


                   Legend for methods (inner boxes)
                        # calling methods

       d            complexity       # executions
            c
                                    invocation on self
       C2                          red = not executed
                                   blue = abstract




DEMO                                                     18
Successive improvement




Version 2.2   Version 2.3   Version 2.4   Version 2.5
 27.27%        54.54%        87.71%         100%




                                                        19
4 patterns




             20
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
Reducing code complexity

 Version 1.58.1     Version 1.58.9
Coverage: 40.57%   Coverage: 60.60%




                                      22
Reducing code complexity




        Version 2.10




        Version 2.17
                           23
Visualizing data with Roassal

Roassal is an agile and interactive visualization engine
Visualizing Incidents at the Fire
       Department of NY
Supported Platforms
Multidimentional profiling


r methods
                                                         XMLTokenizer>>nextName
r 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 before

his method did not exist before
Differences between tests
Conclusion



Little innovation in the tools we commonly use
  Profilers, debuggers, testing tools have not significantly evolved

Fantastic opportunities for improvement
Kai, Hapao and Roassal are just a beginning
Feel free to provide feedback on our tool




                                                                     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%

More Related Content

Viewers also liked

Continuous Integration: a practical approach
Continuous Integration: a practical approachContinuous Integration: a practical approach
Continuous Integration: a practical approachESUG
 
Object Centric Reflection
Object Centric ReflectionObject Centric Reflection
Object Centric ReflectionESUG
 
Welcome ghent
Welcome ghentWelcome ghent
Welcome ghentESUG
 
Across 31 Years
Across 31 YearsAcross 31 Years
Across 31 YearsESUG
 
Smalltalk In the Cloud
Smalltalk In the CloudSmalltalk In the Cloud
Smalltalk In the CloudESUG
 
IWST12: Spec
IWST12: SpecIWST12: Spec
IWST12: SpecESUG
 
Zinc WebSockets
Zinc WebSocketsZinc WebSockets
Zinc WebSocketsESUG
 

Viewers also liked (7)

Continuous Integration: a practical approach
Continuous Integration: a practical approachContinuous Integration: a practical approach
Continuous Integration: a practical approach
 
Object Centric Reflection
Object Centric ReflectionObject Centric Reflection
Object Centric Reflection
 
Welcome ghent
Welcome ghentWelcome ghent
Welcome ghent
 
Across 31 Years
Across 31 YearsAcross 31 Years
Across 31 Years
 
Smalltalk In the Cloud
Smalltalk In the CloudSmalltalk In the Cloud
Smalltalk In the Cloud
 
IWST12: Spec
IWST12: SpecIWST12: Spec
IWST12: Spec
 
Zinc WebSockets
Zinc WebSocketsZinc WebSockets
Zinc WebSockets
 

More from ESUG

Workshop: Identifying concept inventories in agile programming
Workshop: Identifying concept inventories in agile programmingWorkshop: Identifying concept inventories in agile programming
Workshop: Identifying concept inventories in agile programmingESUG
 
Technical documentation support in Pharo
Technical documentation support in PharoTechnical documentation support in Pharo
Technical documentation support in PharoESUG
 
The Pharo Debugger and Debugging tools: Advances and Roadmap
The Pharo Debugger and Debugging tools: Advances and RoadmapThe Pharo Debugger and Debugging tools: Advances and Roadmap
The Pharo Debugger and Debugging tools: Advances and RoadmapESUG
 
Sequence: Pipeline modelling in Pharo
Sequence: Pipeline modelling in PharoSequence: Pipeline modelling in Pharo
Sequence: Pipeline modelling in PharoESUG
 
Migration process from monolithic to micro frontend architecture in mobile ap...
Migration process from monolithic to micro frontend architecture in mobile ap...Migration process from monolithic to micro frontend architecture in mobile ap...
Migration process from monolithic to micro frontend architecture in mobile ap...ESUG
 
Analyzing Dart Language with Pharo: Report and early results
Analyzing Dart Language with Pharo: Report and early resultsAnalyzing Dart Language with Pharo: Report and early results
Analyzing Dart Language with Pharo: Report and early resultsESUG
 
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6ESUG
 
A Unit Test Metamodel for Test Generation
A Unit Test Metamodel for Test GenerationA Unit Test Metamodel for Test Generation
A Unit Test Metamodel for Test GenerationESUG
 
Creating Unit Tests Using Genetic Programming
Creating Unit Tests Using Genetic ProgrammingCreating Unit Tests Using Genetic Programming
Creating Unit Tests Using Genetic ProgrammingESUG
 
Threaded-Execution and CPS Provide Smooth Switching Between Execution Modes
Threaded-Execution and CPS Provide Smooth Switching Between Execution ModesThreaded-Execution and CPS Provide Smooth Switching Between Execution Modes
Threaded-Execution and CPS Provide Smooth Switching Between Execution ModesESUG
 
Exploring GitHub Actions through EGAD: An Experience Report
Exploring GitHub Actions through EGAD: An Experience ReportExploring GitHub Actions through EGAD: An Experience Report
Exploring GitHub Actions through EGAD: An Experience ReportESUG
 
Pharo: a reflective language A first systematic analysis of reflective APIs
Pharo: a reflective language A first systematic analysis of reflective APIsPharo: a reflective language A first systematic analysis of reflective APIs
Pharo: a reflective language A first systematic analysis of reflective APIsESUG
 
Garbage Collector Tuning
Garbage Collector TuningGarbage Collector Tuning
Garbage Collector TuningESUG
 
Improving Performance Through Object Lifetime Profiling: the DataFrame Case
Improving Performance Through Object Lifetime Profiling: the DataFrame CaseImproving Performance Through Object Lifetime Profiling: the DataFrame Case
Improving Performance Through Object Lifetime Profiling: the DataFrame CaseESUG
 
Pharo DataFrame: Past, Present, and Future
Pharo DataFrame: Past, Present, and FuturePharo DataFrame: Past, Present, and Future
Pharo DataFrame: Past, Present, and FutureESUG
 
thisContext in the Debugger
thisContext in the DebuggerthisContext in the Debugger
thisContext in the DebuggerESUG
 
Websockets for Fencing Score
Websockets for Fencing ScoreWebsockets for Fencing Score
Websockets for Fencing ScoreESUG
 
ShowUs: PharoJS.org Develop in Pharo, Run on JavaScript
ShowUs: PharoJS.org Develop in Pharo, Run on JavaScriptShowUs: PharoJS.org Develop in Pharo, Run on JavaScript
ShowUs: PharoJS.org Develop in Pharo, Run on JavaScriptESUG
 
Advanced Object- Oriented Design Mooc
Advanced Object- Oriented Design MoocAdvanced Object- Oriented Design Mooc
Advanced Object- Oriented Design MoocESUG
 
A New Architecture Reconciling Refactorings and Transformations
A New Architecture Reconciling Refactorings and TransformationsA New Architecture Reconciling Refactorings and Transformations
A New Architecture Reconciling Refactorings and TransformationsESUG
 

More from ESUG (20)

Workshop: Identifying concept inventories in agile programming
Workshop: Identifying concept inventories in agile programmingWorkshop: Identifying concept inventories in agile programming
Workshop: Identifying concept inventories in agile programming
 
Technical documentation support in Pharo
Technical documentation support in PharoTechnical documentation support in Pharo
Technical documentation support in Pharo
 
The Pharo Debugger and Debugging tools: Advances and Roadmap
The Pharo Debugger and Debugging tools: Advances and RoadmapThe Pharo Debugger and Debugging tools: Advances and Roadmap
The Pharo Debugger and Debugging tools: Advances and Roadmap
 
Sequence: Pipeline modelling in Pharo
Sequence: Pipeline modelling in PharoSequence: Pipeline modelling in Pharo
Sequence: Pipeline modelling in Pharo
 
Migration process from monolithic to micro frontend architecture in mobile ap...
Migration process from monolithic to micro frontend architecture in mobile ap...Migration process from monolithic to micro frontend architecture in mobile ap...
Migration process from monolithic to micro frontend architecture in mobile ap...
 
Analyzing Dart Language with Pharo: Report and early results
Analyzing Dart Language with Pharo: Report and early resultsAnalyzing Dart Language with Pharo: Report and early results
Analyzing Dart Language with Pharo: Report and early results
 
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6
 
A Unit Test Metamodel for Test Generation
A Unit Test Metamodel for Test GenerationA Unit Test Metamodel for Test Generation
A Unit Test Metamodel for Test Generation
 
Creating Unit Tests Using Genetic Programming
Creating Unit Tests Using Genetic ProgrammingCreating Unit Tests Using Genetic Programming
Creating Unit Tests Using Genetic Programming
 
Threaded-Execution and CPS Provide Smooth Switching Between Execution Modes
Threaded-Execution and CPS Provide Smooth Switching Between Execution ModesThreaded-Execution and CPS Provide Smooth Switching Between Execution Modes
Threaded-Execution and CPS Provide Smooth Switching Between Execution Modes
 
Exploring GitHub Actions through EGAD: An Experience Report
Exploring GitHub Actions through EGAD: An Experience ReportExploring GitHub Actions through EGAD: An Experience Report
Exploring GitHub Actions through EGAD: An Experience Report
 
Pharo: a reflective language A first systematic analysis of reflective APIs
Pharo: a reflective language A first systematic analysis of reflective APIsPharo: a reflective language A first systematic analysis of reflective APIs
Pharo: a reflective language A first systematic analysis of reflective APIs
 
Garbage Collector Tuning
Garbage Collector TuningGarbage Collector Tuning
Garbage Collector Tuning
 
Improving Performance Through Object Lifetime Profiling: the DataFrame Case
Improving Performance Through Object Lifetime Profiling: the DataFrame CaseImproving Performance Through Object Lifetime Profiling: the DataFrame Case
Improving Performance Through Object Lifetime Profiling: the DataFrame Case
 
Pharo DataFrame: Past, Present, and Future
Pharo DataFrame: Past, Present, and FuturePharo DataFrame: Past, Present, and Future
Pharo DataFrame: Past, Present, and Future
 
thisContext in the Debugger
thisContext in the DebuggerthisContext in the Debugger
thisContext in the Debugger
 
Websockets for Fencing Score
Websockets for Fencing ScoreWebsockets for Fencing Score
Websockets for Fencing Score
 
ShowUs: PharoJS.org Develop in Pharo, Run on JavaScript
ShowUs: PharoJS.org Develop in Pharo, Run on JavaScriptShowUs: PharoJS.org Develop in Pharo, Run on JavaScript
ShowUs: PharoJS.org Develop in Pharo, Run on JavaScript
 
Advanced Object- Oriented Design Mooc
Advanced Object- Oriented Design MoocAdvanced Object- Oriented Design Mooc
Advanced Object- Oriented Design Mooc
 
A New Architecture Reconciling Refactorings and Transformations
A New Architecture Reconciling Refactorings and TransformationsA New Architecture Reconciling Refactorings and Transformations
A New Architecture Reconciling Refactorings and Transformations
 

Recently uploaded

Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 

Recently uploaded (20)

Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 

Object Centric Profiling

  • 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
  • 3. Execution profiling with Kai Problem: Traditional code profilers are driven by the method stack, discarding the notion of sending messages Why 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. Execution sampling profiler 54.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. Structural profiling blueprint legend for methods # executions (color) execution #different time receiver 5
  • 6. Behavioral profiling blueprint legend for methods # executions gray = side m1 m3 execution effect m1 time invokes yellow = m2 m2 and m3 no side effect DEMO 6
  • 7. Structural profiling blueprint bounds legend for methods # executions (color) execution #different time receiver 7
  • 8. Behavioral profiling blueprint legend for methods # executions gray = side m1 m3 execution effect m1 time invokes yellow = m2 m2 and m3 bounds no side effect 8
  • 9. Code of the bounds method MOGraphElement>>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. Memoizing MOGraphElement>>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. Upgrading MOGraphElement>>bounds A B C 11
  • 12. 43% speedup Upgrading MOGraphElement>>bounds A B C 12
  • 13. A Upgrading MOGraphElement>>bounds B 13
  • 14. B C A cached make absoluteBounds call abs instead of ab A' C' B' C' 14
  • 15. B C A D cached make display:on: absoluteBounds call absoluteBounds instead of absoluteBoundsFor: A' C' B' C' 15
  • 16. B C A D cached make display:on: absoluteBounds call absoluteBounds instead of absoluteBoundsFor: A' C' B' C' 16
  • 17. Test coverage with Hapao Problem: Traditional code coverage tools have a binary view of the world Why 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. Test blueprint C1 Legend for methods (inner boxes) # calling methods d complexity # executions c invocation on self C2 red = not executed blue = abstract DEMO 18
  • 19. Successive improvement Version 2.2 Version 2.3 Version 2.4 Version 2.5 27.27% 54.54% 87.71% 100% 19
  • 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. Reducing code complexity Version 1.58.1 Version 1.58.9 Coverage: 40.57% Coverage: 60.60% 22
  • 23. Reducing code complexity Version 2.10 Version 2.17 23
  • 24. Visualizing data with Roassal Roassal is an agile and interactive visualization engine
  • 25. Visualizing Incidents at the Fire Department of NY
  • 27.
  • 28. Multidimentional profiling r methods XMLTokenizer>>nextName r 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 before his method did not exist before
  • 30. Conclusion Little innovation in the tools we commonly use Profilers, debuggers, testing tools have not significantly evolved Fantastic opportunities for improvement Kai, Hapao and Roassal are just a beginning Feel free to provide feedback on our tool 30
  • 31. 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%