When selecting part of an application to profile, is it possible to set the filter at the package level (rather than at the method level)?

Yes. You can use an Instrumentation Filter to define classes which will/won't be instrumented and thus included in/removed from profiling results.

Actually, selecting root methods for profiling of Part of Application and setting Instrumentation Filter are two independent ways how to setup a profiling session:

  • By selecting a root method you define an entry point for the profiling - root method and each method called from its call tree will be instrumented and results collected. For example, by selecting servlet's doPost() method you will get all results for your code, webserver layer and core Java implementation. To collect results for only your code, you will also have to set an Instrumentation Filter
  • Instrumentation Filter defines which classes (resp. methods of classes) will be instrumented resp. which won't be instrumented. By setting inclusive Instrumentation Filter that contains just classes of your application, only your code will be instrumented and data collected, which will significantly reduce the profiling overhead. Instrumentation Filter can be set for both Entire Application and Part of Application profiling modes.

Back to NetBeans IDE Profiling FAQs

Back to NetBeans User FAQs

Not logged in. Log in, Register

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