XHPROF/XHGUI with apacheBench - apachebench

I'm currently setting up a benchmark for different frameworks.
I succesfully installed and configured XHProf and XHGui (from https://github.com/perftools/xhgui.git). So far everything is going well and I can execute my benchmarks through the webbrowser without any problems.
However, I want to automize my tests using the Apache bench tool. But when I use the following apache bench command xhgui won't store anything to the database and therfore not giving me any results at all:
ab -n 10000 -c 200 http://IP_OF_TEST_APPLICATION/
Does anyone have an idea of how I could get that to work or if it should work already and I'm just doing something terribly wrong with one of the tools?
Thanks in advance.

I figured it out, I had a mistake in my url which lead to not executing the profiler when running the ab command.

Related

Netlogo Benchmarking

I'm a little rusty on running Netlogo from commandline and have never used the benchmarking feature before. It seems promising. =)
I'm totally at the beginning, because it seems NetLogo 6.0 may be a bit different than 5.*.
I'm trying to get the benchmarking suite to run: https://github.com/NetLogo/NetLogo/wiki/Benchmarking
For now, I downloaded some of the files from http://ccl.northwestern.edu/netlogo/models/models/test/benchmarks/
and created 2 directories in my NetLogo 6.0 directory
NetLogo 6.0/models/tests
and
NetLogo 6.0/models/benchmarks
and put the files from http://ccl.northwestern.edu/netlogo/models/models/test/benchmarks/ into my benchmarks directory.
On the website, it says to run ./sbt and then run-main org.nlogo.headless.HeadlessBenchmarker Bureaucrats However, I'm being n00bish and don't have the command ./sbt setup. I saw that this was a general extension installer command thing online, but wasn't sure what to do with it...Sorry. So my question now is, what do I do next in order for me to get this up and running?
From the documentation side of things, I think it may need to be cleared up that there should be a file in /models/test/benchmarks/ named "Bureaucrats Benchmark.nlogo" I didn't realize the driver appends " Benchmark.nlogo" to the name provided. It may be useful to say to provide the <name> to the org.nlogo.headless.HeadlessBenchmarker if the file is called "<name> Benchmark.nlogo"
I didn't get to it yet, but is there any way for us to call all the benchmarks in the benchmarks directory? There was a reference to it in the docs, but I didn't see any command.
Let me know what you think and any help is appreciated!
Edit: After downloading the repo from git, as Bryan suggested, I ran the ./sbt and got the following error.
[error] (run-main-0) java.lang.ClassNotFoundException:
org.nlogo.headless.HeadlessBenchmarker
java.lang.ClassNotFoundException:
org.nlogo.headless.HeadlessBenchmarker at
java.lang.ClassLoader.findClass(ClassLoader.java:530) at
java.lang.ClassLoader.loadClass(ClassLoader.java:424) [trace] Stack
trace suppressed: run last root/compile:runMain for the full output.
java.lang.RuntimeException: Nonzero exit code: 1 at
scala.sys.package$.error(package.scala:27) [trace] Stack trace
suppressed: run last root/compile:runMain for the full output. [error]
(root/compile:runMain) Nonzero exit code: 1 [error] Total time: 2 s,
completed Apr 10, 2017 2:16:21 PM
./sbt is included in the NetLogo repository. It's this file. Running that will install sbt (and scala) itself, if need be. Make sure you're inside the root directory of the NetLogo repository when you run it.
Edit:
Wait, to clarify, are you trying to benchmark your own models or NetLogo itself?
If NetLogo itself (which is what https://github.com/NetLogo/NetLogo/wiki/Benchmarking is talking about), you need to checkout the NetLogo repository from github: https://github.com/NetLogo/NetLogo . The only reason you'd probably want to be doing this is if you're planning on contributing to core NetLogo code or are working on an extension or something.
For just benchmarking your own models, you don't want to do any of that. Typically, it's better to just benchmark from within the NetLogo program, not at the command line. The simplest way of benchmarking is doing things like this:
setup reset-timer repeat 1000 [ go ] print timer
which will tell you how long it takes for your model to do 1000 ticks. So, run that a couple times , modify your model, and then run it a couple more times, and that will give you sense of how your changes affected performance.
For more in depth benchmarking and profiling, use the profiler extension. That will break your program down, telling you how long each procedure is taking and so forth.
I've updated the wiki page with the current correct command. (I changed run-main to headless/runMain.)
is there any way for us to call all the benchmarks in the benchmarks directory?
I think it does that if you don't pass a benchmark name...? Worth a try. (If you figure it out, please update the wiki page.)

how to know which file is being invoked on accessing website in tomcat

I am currently running my applications on Tomcat 7u59 with JDK6. My developers are requesting me to deploy there class files in the production environment while I am asking them to test on the testing environment.
They are getting it tested but I am not sure whether they are getting tested the module that contains the class files they asked me to place in the production environment. And neither the testing team helps in this regard.
So, in this regard, I would like to know which files of the application are being invoked when a particular module is tested.
Could anyone help me in this regard? Any alternate suggestions are helpful.
if you are on a linux system you can use lsof command with some grep command in pipe.
Hope it helps

RPC Server Unavailable error on TestComplete 11

I am hoping someone here can at least point me in the right direction to solving this frustrating issue. The smartbear community had no response.
I have a bunch of tests set up in TestComplete to test a web application. When I run them all at once, I consistently get an RPC Server Unavailable Error. I have no idea what this means. When I run the tests individually, there is no issue with the scripts.
I have tried running them in a script, calling them from a keyword test, and just using the project set up to call them all in order. No dice. Running each test manually completely defeats the purpose of automation.
Any ideas on how to fix this or at least where the F*** to start?? I did not have this problem with TC10, only when I upgraded to TC11
Thanks
So, in each of my modules, I was opening and closing Chrome. I decided to try taking out the close statement. Boom, no error. It still refreshes the page, which is fine. I don't know why this was a problem, but I got it to run all the modules concurrently

Can't run Informix 4GL Interactive Debugger

I am reading through Informix 4GL By Example. Ex4 is giving a segmentation fault so I am attempting to use the debugger to find out where the program is failing, but the debugger is not working.
From within r4gl, I can compile forms and modules. But when I debug it shows a blank screen with
"Press Return to continue".
From the command line fgldb returns the following error:
fgldb: symbol lookup error: fgldb: undefined symbol: kw__numkws
DB is up and running, I can isql in and run queries.
System details:
OpenSuSE 12.1 32 bit
Informix RDS 7.50 UC6
Informix SQL DEV 7.50 UC6
Informix Growth Edition 11.70 UC5
Informix Interactive Debugger 7.50 UC6
I have searched the net, but have not found anything helpful. Any idea what's wrong?
UPDATE 1:
Thank you again for the assistance. I will be trying to install in a seperate directory and let you know. This is probably blonde but how do I install in a different directory. If I attempt to I get errors:
"INFORMIXDIR and working directory do not match."
"INFORMIXDIR = /usr/informix"
"Current working directory = /usr/informix/i4gl"
Can I edit $INFORMIXDIR to match where I want to install?
Many thanks,
Neill
UPDATE 2:
OK, so I got them both installed in /usr/informix/i4gl.
Set variables to point to that directory, not sure exactly which ones need to though because I still receive errors.
fgldb: -16326: Cannot open file 'fgldb.iem'
The /usr/informix/i4gl does contain a directory msg/en_us/0333, but that file does not exist there, while /usr/informix/msg/en_us/0333 does include the fgldb.iem file.
isql -> Query Language: Says SELECT DATABASE, but none or shown for me to select.
Kind regards
Neill
UPDATE 3:
OK, my blonde momnets are getting crazy now, but after installing into /usr/informix/i4gl, I never changed back the $INFORMIXDIR variable. I did this and then stopped and started the DB.
Now when trying to compile the demo f_custkey.per (using stores_demo db as before) form, I get errors -329 and -2810, which are to do with the database not found.
I am not sure if this is what you were talking about in your last statement. I am unsure if splitting these two into seperate directories has solved my debugger issue because now I can't compile anything, but I sense I am getting close.
Kind regards,
Neill
UPDATE 4 - Final!
OK, so it is working now.
Ran the dbaccessdemo7 command again to recreate the database and all is well in the land of nod.
Compiling and debugging ex4 now works.
Thank you so much for all the information. Learning as I go.
Kind regards
Neill
The kw_numkws issue is fixed post 7.50.UC6. So the next available fixpack will have the fix.
In the interim, IBM Technical Support has posted a "Tech Alert" advising customers to install I4GL (and ISQL) in a separate directory - option #2 suggested by Jonathan Leffler above.
The core dump/crash that you're hitting is an unfortunate bug that we found out about earlier this week. The ESQL/C code is fixed (as of today), but the fixed releases are not yet available, and won't be for a while (read 'until after Thanksgiving at the earliest'). The I4GL and ISQL code still has to be fixed (some separate, but closely related problems).
What's happened is that a structure changed size in the CSDK. I4GL will be compiling the code with the one size and the CSDK libraries are expecting another size; the difference is about 4 bytes.
This leads to hard to track memory overwriting.
The kw__numkws issue is an older problem that I thought was fixed in 7.50.UC6. I'll have to check whether that release did get the fix, and if so, how you are seeing that error still.
There are a couple of short-term options that should get you going until a fixed ensemble is available:
Reinstall I4GL (and ISQL) in the server directory. I've not proved that this will work. The concept is to make sure I4GL is using the CSDK libraries it was built with, rather than the updated 3.70.xC6 version.
Reinstall I4GL (and ISQL) in a separate directory (/opt/IBM/i4gl, perhaps). Have a suitable sqlhosts file in this directory; it might be a symlink to the one in the IDS directory. Point the I4GL programs at this alternative directory, setting LD_LIBRARY_PATH appropriately.
Option 2 ensures that I4GL is using the 'correct' CSDK. Option 1 may achieve the same result, but I'm not ready to guarantee it. Consequently, I suggest option 2.
If your I4GL code needs to run DB-Access or other programs found in the server $INFORMIXDIR, there are ways to deal with that — indicate in a comment and I'll explain, but I'd rather not confound you if there's no need. (It's not dreadfully hard, but it isn't completely trivial either.)
Option 3. is to discover what CSDK was used to create the 4GL tools and install THAT instead of the current one. In the case of 4GL 7.50FC6 it CSDK 3.70FC4.
I had problems splitting up the engine and the tools. This appears to work, so far.

Error when trying to run Watir test through Fitnesse

I've recently been trying to run the following tutorial:
http://raveendran.wordpress.com/2010/10/20/watir-integration-with-fitnesse/
However I when I attempt to run the test in Fitnesse, it just sticks on "running test" without ever doing anything. I have tried to replace some of the Syntax, formatting etc but I just get the same result. Does anyone know how successfully implement this tutorial?
Many thanks for any help provided.
Matt
I remember doing that. It was tough to set up correctly. I can't remember much about it, but there was a fixture that helped me at Faucets. Good luck.

Resources