Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #32259
| Path | csiph.com!optima2.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!1.eu.feeder.erje.net!news.albasani.net!.POSTED!not-for-mail |
|---|---|
| From | Sebastian <news@seyweiler.dyndns.org> |
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: method micro benachmarking with reflection |
| Date | Tue, 04 Aug 2015 21:44:12 +0200 |
| Organization | albasani.net |
| Lines | 36 |
| Message-ID | <mpr4md$jgl$1@news.albasani.net> (permalink) |
| References | <7c2ab94b-ee4e-41c9-ae71-3896210e80b7@googlegroups.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=ISO-8859-1; format=flowed |
| Content-Transfer-Encoding | 7bit |
| X-Trace | news.albasani.net dx40gyIPJ7NU43F5waek2wAm504Kq9qIP2bY/gQBY3w5eyihOYTKFlLR0UYlyuSVOAWZ5k+NSRzk9Tw0vecKZQ== |
| NNTP-Posting-Date | Tue, 4 Aug 2015 19:44:13 +0000 (UTC) |
| Injection-Info | news.albasani.net; logging-data="mjxDKJZqRArGDkffCngwUC/VFWxDPzzuPp07VPEPvL7RSL9kULA0+4fMUX/aRRFdDlzvCEsdu/Lj3P6hcS67/Wh02V4Y2wSpp/kDWpE6aHtdEsiRyDaApYsX5mqpRUiU"; mail-complaints-to="abuse@albasani.net" |
| User-Agent | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 |
| In-Reply-To | <7c2ab94b-ee4e-41c9-ae71-3896210e80b7@googlegroups.com> |
| Cancel-Lock | sha1:gxBI0mVdIEnLQ1OxaRIhlTk4g9c= |
| Xref | csiph.com comp.lang.java.programmer:32259 |
Show key headers only | View raw
Am 30.07.2015 12:41, schrieb philipp.kraus.flashpixx@gmail.com: > Hello, > > I have got a complex system and I would like to add some microbenchmarks to the application. > So I need the runtime of a method call, but I don't want to add to each method a time counter. Can I add via reflection API a structure, that adds the micro benchmarks automatically? E.g. > > registerbenchmark( myclass.class, mymethod-handle ). > > This calls should do on any object > > myclass x = new myclass(); > > timer start > x.mymethod(); > timer stop > > So I would like to do register all classes & methods on the application startup and on any instance of a class the benchmark code should be run. So I need an event, which is called on each method call. > > Can I register an event-handler at the JVM to get each method call? Does there exists some frameworks for microbenchmarking? > > Hope for any comment, thanks a lot > > Phil > Nowadays, I shoould say, the accepted standard for microbenchmarking on the JVM is JMH. It's part of OpenJDK: http://openjdk.java.net/projects/code-tools/jmh/ And it will become part of the standard, see JEP 230: http://openjdk.java.net/jeps/230 It's also quite easy to use. -- Sebastian
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Find similar | Unroll thread
method micro benachmarking with reflection philipp.kraus.flashpixx@gmail.com - 2015-07-30 03:41 -0700
Re: method micro benachmarking with reflection Arne Vajhøj <arne@vajhoej.dk> - 2015-07-30 07:16 -0400
Re: method micro benachmarking with reflection Arne Vajhøj <arne@vajhoej.dk> - 2015-07-30 21:52 -0400
Re: method micro benachmarking with reflection Arne Vajhøj <arne@vajhoej.dk> - 2015-07-30 21:55 -0400
Re: method micro benachmarking with reflection Eric Sosman <esosman@comcast-dot-net.invalid> - 2015-07-30 08:23 -0400
Re: method micro benachmarking with reflection e.d.programmer@gmail.com - 2015-07-30 06:00 -0700
Re: method micro benachmarking with reflection Eric Sosman <esosman@comcast-dot-net.invalid> - 2015-07-30 09:30 -0400
Re: method micro benachmarking with reflection e.d.programmer@gmail.com - 2015-07-30 08:26 -0700
Re: method micro benachmarking with reflection Eric Sosman <esosman@comcast-dot-net.invalid> - 2015-07-30 11:42 -0400
Re: method micro benachmarking with reflection e.d.programmer@gmail.com - 2015-07-30 10:30 -0700
Re: method micro benachmarking with reflection Eric Sosman <esosman@comcast-dot-net.invalid> - 2015-07-30 14:20 -0400
Re: method micro benachmarking with reflection Jeff Higgins <jeff@invalid.invalid> - 2015-07-30 16:08 -0400
Re: method micro benachmarking with reflection philipp.kraus.flashpixx@gmail.com - 2015-07-30 06:11 -0700
Re: method micro benachmarking with reflection v_borchert@despammed.com (Volker Borchert) - 2015-07-30 21:33 +0000
Re: method micro benachmarking with reflection Eric Sosman <esosman@comcast-dot-net.invalid> - 2015-07-30 18:18 -0400
Re: method micro benachmarking with reflection Arne Vajhøj <arne@vajhoej.dk> - 2015-07-30 20:13 -0400
Re: method micro benachmarking with reflection Jeff Higgins <jeff@invalid.invalid> - 2015-07-30 17:11 -0400
Re: method micro benachmarking with reflection v_borchert@despammed.com (Volker Borchert) - 2015-07-30 21:53 +0000
Re: method micro benachmarking with reflection Sebastian <news@seyweiler.dyndns.org> - 2015-08-04 21:44 +0200
csiph-web