Shay Shmeltzer's Oracle Development Tools Tips

  • June 14, 2005

Event Profiling in JDeveloper

Shay Shmeltzer
Director of Product Management - Oracle

It's been quite a while since I last demoed the event profiler in JDeveloper. I think the last time I did it was in 2002 at the iDevelop conference.

Anyway, I figured out that for the type of developers that come to Javaone this thing might be interesting.

I remembered that there was a way to define your own events for tracking. But I couldn't remember how you do it. Rob came up with the answer, and I'm putting it down here in case I'll forget it again.

All you need to do is add import oracle.jdeveloper.profiler.ProfilerAPI;

to your class (you'll need to add the JDeveloper SDK library to your project's libraries).

Then in your code add something like this when the event you want to track starts:

int my_event_id;

my_event_id=ProfilerAPI.startEvent(1234,"my event");

Then you have your event code, and after the code is finished add this line:


Now when you run the event profiler in JDeveloper it will show your event if and when it is invoked.

You control which events are shown in the profilers->events preferences under your project properties and this is where you can add an entry for your event - set the color etc.

Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.