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 117605 - Bad invocation count in the profiler results
Summary: Bad invocation count in the profiler results
Status: RESOLVED WORKSFORME
Alias: None
Product: profiler
Classification: Unclassified
Component: Base (show other bugs)
Version: 6.x
Hardware: Macintosh Mac OS X
: P3 blocker (vote)
Assignee: J Bachorik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-03 12:42 UTC by fabriziogiudici
Modified: 2008-09-04 13:48 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Screenshot showing the problem (243.29 KB, image/jpeg)
2007-10-03 12:43 UTC, fabriziogiudici
Details

Note You need to log in before you can comment on or make changes to this bug.
Description fabriziogiudici 2007-10-03 12:42:04 UTC
The files to reproduce the test can be obtained as:

svn co -r 3169 https://bluemarine.dev.java.net/svn/bluemarine/trunk/src/blueMarine-core/Core/Thumbnail/src/it/tidalwave/bluemarine/thumbnail/
impl/ThumbnailImage.java https://bluemarine.dev.java.net/svn/bluemarine/trunk/src/blueMarine-core/Core/Thumbnail/test/unit/src/it/tidalwave/
bluemarine/thumbnail/impl

Basically, there are tests that invoke this piece of code:

    private long runDecompress (ThumbnailImage thImage, final ImageReader reader) 
      throws IOException
      {
        final long time = System.currentTimeMillis();
        
        for (int i = 0; i < REPEAT_COUNT; i++)
          {
            if (reader != null)
              {
                thImage.decompressImage(reader);  
              }
            else
              {
                thImage.decompressImage();  
              }
          }
        
        return (System.currentTimeMillis() - time) / REPEAT_COUNT;
      }

REPEAT_COUNT = 100, so the invocation count for decompressImage() must be 100. 

A first test is invoked in the current thread, and the profiler reports correctly 100 invocations; a second test creates two threads each one invoking the code 
above, but in this case the invocation count for decompressImage() is 70. I don't know whether the Time reported is correct.

[Mistral:~] fritz% uname -a
Darwin Mistral.local 8.10.1 Darwin Kernel Version 8.10.1: Wed May 23 16:33:00 PDT 2007; root:xnu-792.22.5~1/RELEASE_I386 i386 i386
[Mistral:~] fritz% java -version
java version "1.5.0_07"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_07-164)
Java HotSpot(TM) Client VM (build 1.5.0_07-87, mixed mode, sharing)
Comment 1 fabriziogiudici 2007-10-03 12:43:27 UTC
Created attachment 50079 [details]
Screenshot showing the problem
Comment 2 fabriziogiudici 2007-10-03 12:45:05 UTC
The test is run by invoking the "Profile" context menu on the test case (ThumbnailImageTest.java)
Comment 3 J Bachorik 2007-10-04 13:34:59 UTC
Tried to reproduce in the current dev build (200710030000) but with no success - the snapshot generated is attached.
If you have more specific details about your environment (eg. messages.log) and/or steps to reproduce this bug it would
help in solving it.
Comment 4 Tomas Hurka 2007-11-07 10:36:32 UTC
Changing target milestone to dev, since NetBeans 6.0 is in high resistance mode.
Comment 5 mariadavydova 2008-09-04 13:48:26 UTC
Couldn't reproduce with the latest build 080903. Please provide steps if you find it again.
Remove incomplete.