[aspectwerkz-user] Pointcut for Thread.run()?
[email protected] Sat, 8 Mar 2008 14:39:49 +0100 (CET)
| Newsgroups | gmane.comp.java.aspectwerkz.user |
|---|---|
| Message-ID | <23693721.1204983589935.JavaMail.ngmail@webmail10> |
Hello AOP-Experts,
I have some code using threads like this:
public void run() {
try {
while (true) {
/* some code */
Thread.sleep( 2000 );
}
} catch ( InterruptedException e ) { e.printStackTrace(); }
}
Now I would like to know how much time it tooks from the moment a thread wa=
kes up to the moment it goes sleeping again.
My problem is that I can't easily match on /* some code */ because it is no=
t a simple function call. All code whose execution time I want to measure i=
s included in the run method.
Can I formulate an adequate pointcut for this?
Can anyone help to fix this problem, please?
Thanks in advance,
Andreas
Jetzt komfortabel bei Arcor-Digital TV einsteigen: Mehr Happy Ends, mehr He=
rzschmerz, mehr Fernsehen! Erleben Sie 50 digitale TV Programme und optiona=
l 60 Pay TV Sender, einen elektronischen Programmf=FChrer mit Movie Star Be=
wertungen von TV Movie. Au=DFerdem, aktuelle Filmhits und prickelnde Erotik=
in der Arcor-Videothek. Infos unter www.arcor.de/tv
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email