Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #7745
| From | Lew <lewbloch@gmail.com> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: (timed) java -verbose ... printing nanoseconds when the function call was made ... |
| Date | 2011-09-08 20:51 -0700 |
| Organization | http://groups.google.com |
| Message-ID | <7eef56e5-1488-40eb-8b51-0b66d9007498@glegroupsg2000goo.googlegroups.com> (permalink) |
| References | <1315532799.291698@nntp.aceinnovative.com> |
"[no name]" wrote: > Is it possible? Maybe using the OS? (like Solaris DTrace?) Your post was a bit on the obscure side. Your subject line was highly abbreviated and your question was not explained in the body of the post. I understood you much better once I read Arne's answer, though. It is considered good netiquette to make the body of your post self-contained. I'm afraid, though, that I am still not entirely clear on your need. When you say (only in the subject) "printing nanoseconds when the function [sic] call was made", do you want to timestamp the point of the call, measure the duration of the method call, or what? A quick glance at the documentation (!) for "java -verbose" and other options to the "java" command <http://download.oracle.com/javase/6/docs/technotes/tools/solaris/java.html> shows that the only option that might have anything to do with timing is "java -Xprof". Googling for "java +Xprof timing" <http://lmgtfy.com/?q=java+%2BXprof+timing> yields some interesting-looking links. The top one I see is <http://www.javaperformancetuning.com/news/qotm037.shtml> which explains the option pretty well, but misspells "its" consistently. However, <http://www.javaperformancetuning.com/> in general should be a useful site for you if you are trying to tune Java performance. As Arne points out, nanosecond timing is a bit of a fantasy. Not only will you have a hard time finding system timing to that accuracy, anything you do to time your Java system will affect the timing. Plus Java is inherently non-deterministic (discount the specialty real-time Java implementations). GC and HotSpot both perform differently depending on run-time conditions. Given the vagueness of your initial question, I'm going to suggest that you have a lot of work ahead of you to design a rigorous timing approach that will provide any kind of meaningful results. -- Lew
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar
(timed) java -verbose ... printing nanoseconds when the function call was made ... lbrt chx _ gemale - 2011-09-09 01:46 +0000
Re: (timed) java -verbose ... printing nanoseconds when the function call was made ... Arne Vajhøj <arne@vajhoej.dk> - 2011-09-08 22:00 -0400
Re: (timed) java -verbose ... printing nanoseconds when the function call was made ... Lew <lewbloch@gmail.com> - 2011-09-08 20:51 -0700
Re: (timed) java -verbose ... printing nanoseconds when the function call was made ... Roedy Green <see_website@mindprod.com.invalid> - 2011-09-09 08:54 -0700
Re: (timed) java -verbose ... printing nanoseconds when the function call was made ... Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-09-09 20:21 -0400
Re: (timed) java -verbose ... printing nanoseconds when the function call was made ... Arne Vajhøj <arne@vajhoej.dk> - 2011-09-09 20:54 -0400
Re: (timed) java -verbose ... printing nanoseconds when the function call was made ... Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at> - 2011-09-10 11:12 +0000
Re: (timed) java -verbose ... printing nanoseconds when the function call was made ... Arne Vajhøj <arne@vajhoej.dk> - 2011-09-10 09:23 -0400
Re: (timed) java -verbose ... printing nanoseconds when the function call was made ... Arne Vajhøj <arne@vajhoej.dk> - 2011-09-10 09:25 -0400
Re: (timed) java -verbose ... printing nanoseconds when the function call was made ... Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at> - 2011-09-10 14:25 +0000
Re: (timed) java -verbose ... printing nanoseconds when the function call was made ... Roedy Green <see_website@mindprod.com.invalid> - 2011-09-09 20:51 -0700
csiph-web