Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 251689 - Both actions 'Profile Class' and 'Profile Method' do not make sense
Both actions 'Profile Class' and 'Profile Method' do not make sense
Status: NEW
Product: profiler
Classification: Unclassified
Component: Base
8.1
PC Windows 7
: P3 (vote)
: TBD
Assigned To: issues@profiler
issues@profiler
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2015-04-07 08:53 UTC by stwr
Modified: 2015-04-07 09:02 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description stwr 2015-04-07 08:53:38 UTC
Product Version: NetBeans IDE Dev (Build 201504020001)
Java: 1.8.0_31; Java HotSpot(TM) 64-Bit Server VM 25.31-b07
Runtime: Java(TM) SE Runtime Environment 1.8.0_31-b13
System: Windows 7 version 6.1 running on amd64; Cp1250; en_US (nb)
User directory: C:\Users\cendrowiczm\AppData\Roaming\NetBeans\dev
Cache directory: C:\Users\cendrowiczm\AppData\Local\NetBeans\Cache\dev

It is NOT a defect. It is my concern only.

When executing the action 'Profile Class' or 'Profile Method' starting from e.g. the 'Navigator' and choosing currently opened project when asked for project to profile, the IDE starts profiler session for this project (runs its 'Main Class').

Indeed, the profiler does NOT profile the entity selected in the 'Navigator' - either class or method. This means that the actions 'Profile Class' or 'Profile Method' do not do what their names are actually saying to the user.

On the other hand it is possible to profile a class or method by attaching to external process but the user must start these processes first.

IMO, the 'Profile Class' or 'Profile Method' actions should start these processes automatically.
Comment 1 stwr 2015-04-07 09:01:21 UTC
Use Case #1:

1. Open the MemoryLeakOrNot?|Example3.java
2. Select the main method in the 'Navigator' and execute the 'Profile Method' action
3. Select MemoryLeakOrNot? when asked for project to profile

Result:

The IDE runs the MemoryLeakOrNot? project (Example2|main) and starts profiler session for it.

Should be (IMO):

The IDE runs the Example3|main and starts profiler session for it.



Use Case #2:

1. Open the MemoryLeakOrNot?|Example3.java
2. Select the class Example3 in the 'Navigator' and execute the 'Profile Class' action
3. Select MemoryLeakOrNot? when asked for project to profile

Result:

The IDE runs the MemoryLeakOrNot? project (Example2|main) and starts profiler session for it.

Should be (IMO):

The IDE recognizes and runs the Example3|main and starts profiler session for it.


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