Domanda

I can't seem to figure out how to articulate what I need well enough to ask Google if such a thing exists and where I might get one, so let me explain myself here and if anyone knows the name of what I'm talking about, please chime in.

Basically I want a piece of software that maps out what happens when I click a button in a web app or regular Java Swing application. The idea being that if I click a button the software will do it's best to show what actions that triggers inside of my software and will create a flow chart that shows on object going to another to another to another, etc etc, so that I have a visual of what's actually happening below the surface. Then, preferably, I can save that flow chart to our documentation here at work.

I figure this must exist because it seems like it would be so darned useful, I just don't know what it's called, so... Anyone who can chime in, I'd appreciate it.

If you're looking for specifics to my situation, it would be nice to see an example (not necessarily the best, this isn't going to be one of those threads), but just an example that is used to analyze Spring/Java apps.

È stato utile?

Soluzione

I figure this must exist because it seems like it would be so darned useful, I just don't know what it's called, so... Anyone who can chime in, I'd appreciate it.

I think you're looking for a "profiler".

The Eclipse Test & Performance Tools Platform Project is the closest thing that I know of. See slide 114 of this presentation. It appears to be exactly what you're looking for.

Perhaps this might be a worthwhile framework to throw together myself?

If you want to do something on your own....

1) No need to write a profiling framework yourself or rely on AOP within your app. Check out BTrace and the JVisualVM plugin for BTrace. It instruments your classes at run time to do all sorts of fun things . You could easily write a class for BTrace that saved method invocation data to a JSON or XML format for use by another tool.

2) For the visualization part, you may need to do some work on your own. If it were me, I'd look at using BTrace to dump the method calls to XML and then use XSLT to transform it to the format read by something like ArgoUML. Alternatively, dump method calls to JSON and use some sort of Javascript diagramming library.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top