When running the TestHarness, you may wish to run a profiler. This page describes one way we have got a profiler running - it may not be the best way or the best profiler but it worked and we were having a lot of trouble getting anything to work. (Turned out the issue was not the profiling but one particular PC doesn't seem to like profilers.)
- Downloaded the JBossProfiler and extract out the files.
- Created a directory c:/temp/jbossprofiler
- Modified run.bat adding the XrunjbossInspector entry:
set JAVA_OPTS=%JAVA_OPTS% -Xms128m -Xmx512m -XrunjbossInspector:c:/temp/jbossprofiler,include=org.lamsfoundation,ignore=*
- Added the directory containing jbossInspector.dll in my path. In my case, I added "C:\jboss-profiler-1.0.CR4\jvmpi\windows".
- The jboss-profiler.war shound NOT be in deploy
- Started jboss using the run.bat (ie from windows, not eclipse).
- Logged into LAMS, made sure everything was working okay. When ready to start profiling, went to the run.bat command window and did CTRL-BREAK. This turned on the data collection.
- Ran a learner session in LAMS. Went to the run.bat command window and did CTRL-BREAK. This turned off the data collection.
- Stopped JBOSS, reset the run.bat to its normal JAVA_OPTS setting.
- Added jboss-profiler.war to deploy and removed lams.ear from deploy.
- Back in Eclipse I started JBOSS server and went to http://localhost:8080/jboss-profiler/, selected the directory where my log files were (C:\temp\jbossprofiler), selected the process id. It went through the gz files, processed the registers
- Have a cuppa as it was going to take a while, work on something else while it works away in the background (having two PCs is handy at this point).
- Bingo - results processed. Save the results because I don't want to wait another minor eternity if the browser crashes.
I had
- jbossInspector.dll in my path
- profilerConsole.jar in D:\jboss-4.0.2\server\default\lib (I don't know if this is needed but I've got it there anyway)
- jboss-profiler-noAOP.sar in the deploy directory (again, as I'm using CTRL-BREAK to start and stop this may not be needed)
- lams.ear in deploy for generating the log files and jboss-profiler.war in deploy for analysing the log files.