Performance metrics attributed to lines


Dev: Thomas Preisler (TP, NB nick: thp)


Lead: Maria Tishkova


User View

How to show sources with metrics annotations?

Metrics annotations are connected to the stack view and are automatically shown in source files when stack view is show. Source line annotations are the same numbers as shown in the stack view. Currently CPU usage, Memory usage and Thread usage all support a stack view. The flow is something like this: User runs app with profiler (CPU Usage for instance) on. When the user clicks on the Hot Spots... button in the instrument view, the stack view is shown and sources are automatically annotated with the metrics shown in stack view.

Annotation elements

Three elements:

  • Metrics numbers in left bar with tooltip with formatted column/metric text for each line with annotations
  • Text highlighting of source line
  • Navigation bars in right bar (one per line with metrics). Each bar also has formatted column/metric tooltip.

Annotation examples:


What can the user control?

The user can control two things: user can turn annotations completely off (and back on) using Show Profiler Metrics menu action in View menu (similar to how line numbers are turned on/off): Image:dlightAnnotationsShow_CND68PerformanceMetrics.jpg

And user can control the following colors: foreground/background colors of metric text and foreground color of navigation bar. Color controls are in Tools|Fonts&Colors|Highlighting under 'Profiler metrics source line annotations' and 'Profiler metrics navigation bars'.



No P1 or P2 issues.


Test Plan


Milestone Date Content

Risks and dependencies

Status and test results

Design specifications

Unit tests


Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo