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 26006

Summary: Infrastructure to notify about regressions (in # of class) during startup
Product: ide Reporter: Jaroslav Tulach <jtulach>
Component: PerformanceAssignee: _ rkubacki <rkubacki>
Status: CLOSED FIXED    
Severity: blocker CC: jglick, rkubacki, ttran
Priority: P2 Keywords: PERFORMANCE
Version: 3.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:
Bug Depends on:    
Bug Blocks: 21676    
Attachments: original patch idea

Description Jaroslav Tulach 2002-07-25 10:34:35 UTC
Recently (during 3.4 development) we noticed the
startup time beying affected by different modules
trying to do more and more work during boot time.
This is not by itself wrong, but we need to have a
way to find out that some module did such change
and evaluate and review it. That is why I propose:

1. During first startup (part of regular build)
run the VM with -verbose:class flag and capture
the list of generated files to a file.

2. Compare the content of that file with a
golden-file to be sure that no not new module
class is loaded during the startup.

3. If a class or bunch of classes is detected to
be unexpectedly loaded, complain heavilly so the
regular process can send warning emails to
broken_builds@nb.org
Comment 1 Jaroslav Tulach 2002-07-25 10:35:36 UTC
This is an infrastructure need to make work done during issue 21676
meaningful.
Comment 2 Petr Nejedly 2002-07-25 11:15:48 UTC
Do you mean part of each developer's local regular build
or as a part of the daily/continuous build?

It should be quite easy on UNIX building machines using standard
unix text tools, it have to be implemented in java otherwise.

There is a little problem with -verbose:class and that is it sometimes
mangle the output with other texts, but the impact should be minimal
(<5 wrong items per run)

What kind of golden file you mean? One big for stable module
configuration or a per module (not that easy). Who will manage
the golden files? (They would have to be updated quite frequently).

Shouldn't it rather be part of tests run instead of firststart
(I'd rather measure second start anyway ;-)
Comment 3 Michal Zlamal 2002-07-25 13:31:43 UTC
>It should be quite easy on UNIX building machines using 
standard
> unix text tools, it have to be implemented in java 
otherwise.

I think it should be platform independ - so use java it 
IMHO best solution...

> What kind of golden file you mean? One big for stable 
module
> configuration or a per module (not that easy). Who will 
manage
> the golden files? (They would have to be updated quite 
frequently).

It could be stored in CVS somewhere in nbbuild module - I 
don't see any problem with it.
Comment 4 Michal Zlamal 2002-09-20 09:31:41 UTC
Is anybody working on it? I don't like to have P1 in my 
module...
Comment 5 rbalada 2003-03-07 10:32:52 UTC
Nobody is working on this enhancement. IMO I'm not sure this belongs
to nbbuild module.
Comment 6 Jesse Glick 2003-03-10 16:34:48 UTC
It is assigned to Petr and it is still a high priority.

Probably the component could be changed to 'performance'.
Comment 7 rbalada 2003-03-10 16:42:37 UTC
Reassigning to component performance.
Comment 8 Jesse Glick 2003-03-10 16:59:11 UTC
Ruda don't forget to change QA Contact when changing Component...
Comment 9 _ rkubacki 2005-09-15 14:43:23 UTC
Might be implemented for JDK1.5 and newer using
java.lang.management.ClassLoadingMXBean. Just need to enhance our startup tests
Comment 10 _ rkubacki 2006-04-09 13:28:45 UTC
Created attachment 29714 [details]
original patch idea
Comment 11 _ rkubacki 2006-04-09 13:30:39 UTC
We could use management API like in the attachment.

Anyway it is currently part of our footprint tests - count of loaded and
unloaded classes is reported here.
Comment 12 Jaroslav Tulach 2006-04-10 06:06:53 UTC
The beauty of this would show if this test was part of commit validation. 
Otherwise it is just a postmortem tool.
Comment 13 _ rkubacki 2006-04-10 08:13:06 UTC
Re commit-validation: think about current dependency on junit/xtest that can be
probably avoided but also the dependency on particular version of JDK where
updates can have impact and every platform has its L&F implementation that
introduces another difference. Different logging, Xverify, perhaps graphics
accelaration flag can influence results too. 

That said I think we want postmortem regression tests now.