Goethe Center for Scientific Computing (G-CSC)

Goethe University Frankfurt

Personal tools

ShinyProfileViewer 1.34

a Java Viewer for ShinyProfiler's data.

ShinyProfileViewer 1.34 (5. Jun 2014)

 

What it is

ShinyProfileViewer is a viewer for profile data we generate using the ShinyProfiler . 

ShinyProfileViewer

How to install

 
Java .jar file: ShinyProfileViewer.jar
MacOS Bundle: ShinyProfileViewer MacOS Bundle  (notes on damaged files)
 

How to use

Create Profile data
Make sure you are compiling with cmake -DPROFILER=ON .. and your SVN revision is at least 7449.
At the beginning of your script, add the line
ProfileLUA(true)
That way, ug4 profiles each line of your LUA script (up to recursion level 2 for efficiency reasons).
At the end of your script, add the line
WriteProfileData("ShinyProfileData.pdxml")
That way a file ShinyProfileData.pdxml is generated. Execute your script.
 
View your profile data
 
Start ShinyProfileViewer (MacOS: doubleclick on the .app file, Linux: java -jar ShinyProfileViewer.jar), click on Open New... and open the ShinyProfileData.pdxml file. You should see a table like the picture above.
 
An explanation of the table:
  • Name: The name of the Profile node.
  • Group: The group of the profile node.
  • Hits: Number of times this profile node was "visited" i.e. number of times the processor came to that point in the code. For functions this is the number of times they were called.
  • Total: Total time spent in this node.
  • Self: Time spent in this node minus time spent in nodes which are within this node. So if a profiled function A calls another profiled function B, the self time of A is total time of A minus the total time of B. This way you know where the time is really going to.
  • File: the filename. A $-sign stands for the ug4 root.
 
 
 Some things you can do now:
  • Open/Close parts of the call tree
  • select show "all" so that all nodes are shown. select e.g. 1% so that only nodes which make up for 1% of total time are shown. Similar function is "expand".
  • Select "Flat" on top. Click on "Hits", "Self" or "Total" to sort the nodes.
  • Double-clicking on a time opens another ProfileViewer window where that node is the root node, so you can subdivide your profiling.
  • Double-click on a filename to view the source of that part of the code.
  • In the source viewer, you can double-click on lines to get a ProfileViewer of that node. If that node has no sub-nodes, no window will open.
 
File associations:
On Mac: Right-click on the .pdxml file, use "open with" and select the ShinyProfilerViewer.app.
On Linux/Windows: use java -jar <enterPathHere>/ShinyProfileViewer.jar ShinyProfilerData.pdxml . 

 
File format
The file format is XML and should be straightforward. 
We suggest saving your files as .pdxml, so you can set up a file type association .pdxml -> ShinyProfileViewer.
Note that there is the XML Node
<basepath>/Users/mrupp/Documents/workspace/ugsvn</basepath>

This is meant for using ShinyProfileViewer for remotely generated data. By adjusting the basepath here, you are able to view profile data which was generated on computers with different basepath.

You can also fix the root path by clicking on "Fix ug4base Path...".

Outside ug4

We made some changes to the original ShinyProfiler to include groups, filenames and lines, so up to now, you can only use it as it is in ug4.
 

Versions

1.0: first version
1.01: added Export... button which exports data like Shinys output. Pulldown for files and profile nodes.
1.2: Apple Window close fix, basepath can be selected via dialog
1.21: Empty group bug fix (nodes with empty group where not displayed correctly)
1.22: Groups window
1.23: Energy, ug4root path changes
1.3: double click in groups window opens ShinyProfileViewer concerning this group
1.31: added right-click menu, changed default expand to 10%, UI improvements
1.32: MEMORY supported (tag <selfMemory>, <totalMemory> ). Export now uses current tree structure.
1.33: Export fix.
1.34: added compare feature.

Todo:

Better support for groups, parallel support, MPI_Wait display.