File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes seeking help for build the java metric analyzer Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "seeking help for build the java metric analyzer" Watch "seeking help for build the java metric analyzer" New topic

seeking help for build the java metric analyzer

mw lim

Joined: Dec 10, 2003
Posts: 1
i m doing my final project and my title is to create a java metric analyzer.. it is using to analyze a java source code and understand the particular code, then give the result like the code performance, usage time, and how many method it was used, so anyone who r expert, or genious , can u guys please do me a favour, give me some clues to me so that i can complete my final project. thx a lot too all ur helps..........
Joe Ess

Joined: Oct 29, 2001
Posts: 9188

If you look at the documentation for the J2SE, you will see two command line parameters to the java command, -Xprof and -Xrunhprof, which will give you information about various aspects of a running program. One could monitor this input and create metrics from it. . .
[ December 10, 2003: Message edited by: Joe Ess ]

[How To Ask Questions On JavaRanch]
Jim Yingst

Joined: Jan 30, 2000
Posts: 18671
Alternately, if you want metrics that can't be obtained from runtime profiling, but can be obtained from parsing source code, then you may want to look at tools like ANTLR or JavaCC to get you started. There's a bit of a learning curve here I think, so if you only want simple metrics like LOC you might just do simple parsing yourself. But for serious parsing to get mroe complex metrics, tools like ANTLR or JavaCC will probably be quite useful, and worth your while to learn how to use. You might want to think more about just what sort of metrics you want to include.

"I'm not back." - Bill Harding, Twister
I agree. Here's the link:
subject: seeking help for build the java metric analyzer
It's not a secret anymore!