|
|
Tuesday, January 6, 2004 |
Have you discovered the PerformanceProfiler yet? This is a
Toplink class that allows you to add profiling to your log, and it's
simply awesome. Here's a sample of the output:
Profile(ReportQuery,
class=com.fritolay.bsg.pog.db.valueobjects.Customer,
number of objects=17,
total time=80,
local time=80,
query prepare=20,
sql execute=50,
sql generation=10,
time/object=4,
objects/second=212,
)
} End Profile
You enable the profiler with code via your Session. You'll
probably want to do it on your ServerSession so that you can catch
everything, however I can envision a scenario where you might only want
to profile one of your ClientSessions. Whatever. The call
is setProfiler on session and it takes a SessionProfiler, the parent of
PerformanceProfiler.
Have fun!
3:13:32 PM
|
|
Here's a tasty little Toplink morsel to kick of the new year. If you are setting up session logging in Toplink, and you are doing it by hand, you should set the logging options on the ServerSession not the ClientSession. If you set it on the ClientSession, you won't get the SQL statements dumped to your log! How do you like that? Tasty, I know.
2:17:39 PM
|
|
© Copyright 2004 Tom Pierce.
|
|