5608057 / javamelody

Automatically exported from code.google.com/p/javamelody
0 stars 0 forks source link

Configure CPU sampling with a white list #424

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Currently I can only configure the CPU sampling with a black list for packages 
by using the parameter 'sampling-excluded-packages'. I have to list a lot of 
packages I don't want to see, though I cannot exclude classes without a 
package. For example the top 4 of our server:

$Proxy376.executeQuery  38,02
$Proxy376.executeBatch  14,35
$Proxy365.getSingleResult   13,61
$Proxy365.getResultList 12,72

Also sometimes the package list has to be adjusted if somebody adds a new 
library to the project.

If I could use a parameter like 'sampling-included-packages' the configuration 
would be easier. I usually know which packages I want to see, like 
'com.mycompany', but don't know all packages that must be excluded.

Original issue reported on code.google.com by selver...@googlemail.com on 5 Aug 2014 at 8:56

GoogleCodeExporter commented 8 years ago
Attached is a patch to support sampling-included-packages.
You have to either specify sampling-included-packages or 
sampling-excluded-packages.

Regards
Alf Høgemark

Original comment by alf.hoge...@gmail.com on 9 Aug 2014 at 12:47

Attachments:

GoogleCodeExporter commented 8 years ago
Thanks, it looks good.

Original comment by evernat@free.fr on 9 Aug 2014 at 8:32

GoogleCodeExporter commented 8 years ago
I have looked at your patch. And I have changed a few things in it:
When there are both excluded and included parameters, ignoring one parameter 
set by the user, in so many places, seems like a bad smell in code. At the end, 
setting both parameters may not be recommended in general but is accepted now. 
By the way, this change in the patch makes code much simpler.
And I have also fixed some junit tests, which were not working for me.
The new patch is attached.

Original comment by evernat@free.fr on 12 Aug 2014 at 7:29

Attachments:

GoogleCodeExporter commented 8 years ago
The new patch is committed in trunk (revision 3897) and ready for the next 
release (1.53).
Thanks for the patch, which makes it happen, in particular for including unit 
tests.

Original comment by evernat@free.fr on 12 Aug 2014 at 7:49

GoogleCodeExporter commented 8 years ago
Thank you for the fast processing.

Original comment by selver...@googlemail.com on 13 Aug 2014 at 10:03