This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 233636

Summary: [tutorial] Stopwatch time and duration show "duration pending" forever
Product: profiler Reporter: skygo <skygo>
Component: BaseAssignee: issues@profiler <issues>
Status: NEW ---    
Severity: normal CC: jskrivanek
Priority: P3    
Version: 7.4   
Hardware: Other   
OS: Other   
Issue Type: DEFECT Exception Reporter:

Description skygo 2013-07-30 09:03:38 UTC
[ BUILD # : 201307292300 ]
[ JDK VERSION : 1.7.0_25 ]

[windows 8x64 jdk 7u25

== context 

I try to review the tutorial [1] related to profiling point following
 section Measuring Execution Time of a Code Fragment

I adjusted the line to match the blue line in the screenshot. 

== exepectation
I expected a duration in µs and one hit

== current state
I show duration pending stay forever and two hit at same ms



[1] https://netbeans.org/kb/docs/java/profiler-profilingpoints.html
Comment 1 skygo 2015-04-13 09:48:10 UTC
I did additionnal test during netcat profile test session using the Anagram sample linked in #1

== code 
Ex1: For without curly bracket
for (int idx=0; idx<installedLookAndFeels.length; idx++)
PPds  if ("Nimbus".equals(installedLookAndFeels[idx].getName())) {
    javax.swing.UIManager.setLookAndFeel(installedLookAndFeels[idx].getClassName());
    break;
PPde  }

Ex2: For with curly bracket
for (int idx=0; idx<installedLookAndFeels.length; idx++) {
PPds  if ("Nimbus".equals(installedLookAndFeels[idx].getName())) {
    javax.swing.UIManager.setLookAndFeel(installedLookAndFeels[idx].getClassName());
  break;
PPde  }
}
== end code

In case Ex1 on my machine Nimbus is the second L&F detected but I have 2 reports with duration pending should be at least 1 report calculated and the second pending maybe because of the break.

In case Ex2 there is 2 reports but the first one contains data but the second one show duration pending,maybe ok due to the break


I'm not sure what is going on with bracket here, but maybe good to adapt the tutorial to take a less problematic part of code and see results during profiling