tag:blogger.com,1999:blog-3132785414967539357.post3020653922019135851..comments2023-08-21T15:30:52.535+01:00Comments on Exceptionally exceptional exceptions: Performance testing MongoDBAnonymoushttp://www.blogger.com/profile/14335719314813410020noreply@blogger.comBlogger49125tag:blogger.com,1999:blog-3132785414967539357.post-47446554764619433162014-01-02T16:35:51.903+00:002014-01-02T16:35:51.903+00:00Hi
Thank you sooooooo much.. It works like charm. ...Hi<br />Thank you sooooooo much.. It works like charm. Now only learning on mongo and jmeter and if any prob comes in future i will ask.<br /><br />Thanks once again for immediate reply<br />Anonymoushttps://www.blogger.com/profile/00452319791941123578noreply@blogger.comtag:blogger.com,1999:blog-3132785414967539357.post-18043465297065598362014-01-02T08:34:53.162+00:002014-01-02T08:34:53.162+00:00Have you added the MongoDB java client to your cla...Have you added the MongoDB java client to your classpath? See previous comments.Anonymoushttps://www.blogger.com/profile/14335719314813410020noreply@blogger.comtag:blogger.com,1999:blog-3132785414967539357.post-91570635248843433192014-01-02T08:34:36.703+00:002014-01-02T08:34:36.703+00:00Have you added the MongoDB java client to your cla...Have you added the MongoDB java client to your classpath? See previous comments.Anonymoushttps://www.blogger.com/profile/14335719314813410020noreply@blogger.comtag:blogger.com,1999:blog-3132785414967539357.post-3888038591895874562014-01-02T08:01:42.293+00:002014-01-02T08:01:42.293+00:00Hi thanks for your tool.
but when i try to insert ...Hi thanks for your tool.<br />but when i try to insert some data i am getting the following error<br /> jmeter.JMeter: Uncaught exception: java.lang.NoSuchMethodError: com.mongodb.MongoClientOptions.builder()Lcom/mongodb/MongoClientOptions$Builder;<br /> at org.apache.jmeter.protocol.mongodb.config.MongoSourceElement.testStarted(MongoSourceElement.java:139)<br /> at org.apache.jmeter.engine.StandardJMeterEngine.notifyTestListenersOfStart(StandardJMeterEngine.java:214)<br /> at org.apache.jmeter.engine.StandardJMeterEngine.run(StandardJMeterEngine.java:336)<br /> at java.lang.Thread.run(Unknown Source)<br /><br />I am using 2.10 mongo in win7 64 bitAnonymoushttps://www.blogger.com/profile/00452319791941123578noreply@blogger.comtag:blogger.com,1999:blog-3132785414967539357.post-14476170106571778932013-07-11T08:36:41.449+01:002013-07-11T08:36:41.449+01:00Glad you like it.
It is only meant to compare r...Glad you like it. <br /><br />It is only meant to compare relative performances of different scripts trying to achieve similar results; so it's probably not ideal for testing for absolute performances.<br /><br />Let me know you get on and if there are any features you think can be added.Anonymoushttps://www.blogger.com/profile/14335719314813410020noreply@blogger.comtag:blogger.com,1999:blog-3132785414967539357.post-37032737527374298752013-07-11T08:33:48.256+01:002013-07-11T08:33:48.256+01:00Hi Jan,
Thank you very much for the help.
By mis...Hi Jan,<br /><br />Thank you very much for the help.<br /><br />By miss i had downloaded some java doc file.<br /><br />Now again i downloaded the proper file. And its working fine.<br />Thank you. Its a great tool<br />Raghuhttps://www.blogger.com/profile/17510197241539618051noreply@blogger.comtag:blogger.com,1999:blog-3132785414967539357.post-75020260996398823902013-07-11T08:11:11.892+01:002013-07-11T08:11:11.892+01:00java.lang.NoClassDefFoundError: com/mongodb/MongoO...java.lang.NoClassDefFoundError: com/mongodb/MongoOptions<br /><br />The NoClassDefFoundError, means that the class MongoOptions cannot be found.<br /><br />This means you haven't added the mongodb to the classpath.<br />Have you downloaded it and added it to the classpath?<br /><br />You can get it from here...<br />http://central.maven.org/maven2/org/mongodb/mongo-java-driver/<br />Anonymoushttps://www.blogger.com/profile/14335719314813410020noreply@blogger.comtag:blogger.com,1999:blog-3132785414967539357.post-16519991296935166152013-07-11T07:29:28.733+01:002013-07-11T07:29:28.733+01:00Hi Jan,
Thank you very much for the tool.
I start...Hi Jan,<br /><br />Thank you very much for the tool.<br />I started using this tool, but i am getting this error.<br />" jan.mongometer.config.MongoSourceElement: MongoDB Source Config testStarted <br />2013/07/11 11:34:32 ERROR - jmeter.JMeter: Uncaught exception: java.lang.NoClassDefFoundError: com/mongodb/MongoOptions<br /> at jan.mongometer.config.MongoSourceElement.testStarted(MongoSourceElement.java:204)<br /> at org.apache.jmeter.engine.StandardJMeterEngine.notifyTestListenersOfStart(StandardJMeterEngine.java:209)<br /> at org.apache.jmeter.engine.StandardJMeterEngine.run(StandardJMeterEngine.java:325)<br /> at java.lang.Thread.run(Unknown Source)<br />"<br /><br />Can you pls help me out of this.<br />ThanksRaghuhttps://www.blogger.com/profile/17510197241539618051noreply@blogger.comtag:blogger.com,1999:blog-3132785414967539357.post-38668477833395859382013-01-19T21:33:40.453+00:002013-01-19T21:33:40.453+00:00archie, ralph.
I've pushed an update to mongo...archie, ralph.<br /><br />I've pushed an update to mongometer https://github.com/JanPaulEttles/mongometer<br /><br />I've add some narrative here:<br />http://exceptionallyexceptionalexceptions.blogspot.co.uk/2013/01/mongometer-v20.html<br /><br />Let me know your thoughts.Anonymoushttps://www.blogger.com/profile/14335719314813410020noreply@blogger.comtag:blogger.com,1999:blog-3132785414967539357.post-65755796096554345902013-01-13T22:38:27.525+00:002013-01-13T22:38:27.525+00:00Thanks Archie. Glad you find it useful.
I'm ...Thanks Archie. Glad you find it useful.<br /><br />I'm hoping you and Ralph can give me some ideas for additional functionality, as I may now have some time to spend on dev again.Anonymoushttps://www.blogger.com/profile/14335719314813410020noreply@blogger.comtag:blogger.com,1999:blog-3132785414967539357.post-26939765073977730362013-01-13T19:29:15.723+00:002013-01-13T19:29:15.723+00:00Jan,
My congratulations on your family changes!
I ...Jan,<br />My congratulations on your family changes!<br />I just tried the latest version of you mongometer.jar - it works excellent.<br />Really useful tool, and it is the only one I could find.<br />Thank you very much.<br /><br /><br />archiehttps://www.blogger.com/profile/16847404125370719677noreply@blogger.comtag:blogger.com,1999:blog-3132785414967539357.post-89926538356380687262013-01-12T09:04:39.854+00:002013-01-12T09:04:39.854+00:00Awesome. Glad it worked for you, Ralph.
Hope arch...Awesome. Glad it worked for you, Ralph. <br />Hope archie gets word that you can now add a second sampler to the ThreadGroup.Anonymoushttps://www.blogger.com/profile/14335719314813410020noreply@blogger.comtag:blogger.com,1999:blog-3132785414967539357.post-77123589471575799492013-01-12T03:33:04.326+00:002013-01-12T03:33:04.326+00:00♫♫♫ Happy days are here again ♫♫♫
Thank you Jan! ...♫♫♫ Happy days are here again ♫♫♫<br /><br />Thank you Jan! Your fix worked great. I was able to get my work completed today and on time.<br /><br />Your mongoDB script component for JMeter is the easiest solution to use for manipulating mongo databases from JMeter.<br /><br />I'll be sure to let you know what other features would be useful. I'll also try to setup my environment to develop and help any way I can.<br /><br />btw, Congratulations on your new job and second kid!Anonymoushttps://www.blogger.com/profile/02937399296747649720noreply@blogger.comtag:blogger.com,1999:blog-3132785414967539357.post-24727109913219912822013-01-12T00:30:42.653+00:002013-01-12T00:30:42.653+00:00Ralph / archie
Sorry archie, kinda missed your po...Ralph / archie<br /><br />Sorry archie, kinda missed your post, then moved jobs and had a second kid.<br /><br />Anyhoo, you should now be able to run against multiple dbs. <br /><br />As I said before, it was never designed for this, bu tit should be good to go now.<br /><br />(spent more time recreating ssh keys and syncing git than it took to write the 'fix')<br /><br />Let me know how it goes, and let me know if you need more functionality.<br /><br />JpAnonymoushttps://www.blogger.com/profile/14335719314813410020noreply@blogger.comtag:blogger.com,1999:blog-3132785414967539357.post-21015976014262372412013-01-11T19:26:57.278+00:002013-01-11T19:26:57.278+00:00Yes, I added the second script to the same Thread ...Yes, I added the second script to the same Thread Group by duplicating the first mongoDB script JMeter component and then modifying its fields. The Thread Group is set to 'Continue' after Sampler error.<br /><br />In the second mongoDB script, the mongoDB server is the same as used in the first script, but the db and collection are different.<br /><br />Here is the second script:<br />db.cpath.find( { "profileID" : "${ID}", "name" : "Default" }, { "_id" : 1 } ).toArray()<br /><br />As you can see, the second mongoDB script will utilize the ID variable which was initialized from the previous mongoDB script to build the query.<br /><br />I use another JSON Path Extractor (child to the second MongoDB script) to put the returned mongodb value into the variable ID2:<br />$[0]._id<br /><br />The weird thing is that the first mongodb script works by returning a proper value when the second is disabled. Enable both, and the both return NULL.<br /><br />It seems like there is some incompatibility that happens when multiple mongoDB scripts are enabled in the same Thread Group.Anonymoushttps://www.blogger.com/profile/02937399296747649720noreply@blogger.comtag:blogger.com,1999:blog-3132785414967539357.post-71411478910771086822013-01-11T17:35:45.026+00:002013-01-11T17:35:45.026+00:00When you say you enable a second script are you sa...When you say you enable a second script are you saying you add a second script to the ThreadGroup?<br />Can you share the second mongo script.Anonymoushttps://www.blogger.com/profile/14335719314813410020noreply@blogger.comtag:blogger.com,1999:blog-3132785414967539357.post-88595528271310388032013-01-11T17:27:12.189+00:002013-01-11T17:27:12.189+00:00Hi Jan,
Thank you for responding so quickly! I n...Hi Jan,<br /><br />Thank you for responding so quickly! I need to get this working soon. It will take me a while to get familar enough with the JMeter Sampler requirements to see if the mongoDB script code meets al the requirements so I will attempt it this weekend.<br /><br />For today, I am looking into other less pretty (more complicated) ways to implement getting mongoDB values into JMeter variables (e.g. BSF Sampler using Groovy script to call mongo directly and pass values back to JMeter)<br /><br />Below is more information in case you have time this weekend to look into it.<br /><br />This is the request for the first MongoDB script:<br />db.useraccount.find( { "email" : "ralph@navarrocomputing.com" }, { _id:1 } ).toArray()<br /><br />This is the actual and expected response data for the first MongoDB script when the second MongoDB script is disabled:<br />[ { "_id" : "b4a634aa-e71b-410e-9ead-cada44b26ea0"}]<br /><br />I pull the _id value into an ID variable using ATLANTBH's JSON Path Extractor ( https://github.com/ATLANTBH/jmeter-components ) with the following:<br />$[0]._id<br /><br />Debug PostProcessor shows the variable has been initialized properly so the mongoDB script and JSON path extractor worked:<br />ID=b4a634aa-e71b-410e-9ead-cada44b26ea0<br /><br />Here is the problem: <br />As soon as I enable a second mongoDB script that does a similar query to get another variable initialized with data from another db/collection, both mongoDB scripts return null:<br />[]<br /><br />Debug PostProcessor shows the variables also get set to NULL:<br />ID=NULL<br />ID2=NULL<br /><br />There is a NullPointerException that shows up in the JMeter Log Viewer only during the second run when both mongoDB scripts are enabled:<br /><br />2013/01/11 12:09:56 INFO - jmeter.engine.StandardJMeterEngine: Running the test! <br />2013/01/11 12:09:57 INFO - jmeter.gui.util.JMeterMenuBar: setRunning(true,*local*) <br />2013/01/11 12:09:57 INFO - jmeter.engine.StandardJMeterEngine: Starting ThreadGroup: 1 : Content Thread Group <br />2013/01/11 12:09:57 INFO - jmeter.engine.StandardJMeterEngine: Starting 1 threads for group Content Thread Group. <br />2013/01/11 12:09:57 INFO - jmeter.engine.StandardJMeterEngine: Thread will continue on error <br />2013/01/11 12:09:57 INFO - jmeter.threads.ThreadGroup: Starting thread group number 1 threads 1 ramp-up 1 perThread 1000.0 delayedStart=false <br />2013/01/11 12:09:57 INFO - jmeter.threads.ThreadGroup: Started thread group number 1 <br />2013/01/11 12:09:57 INFO - jmeter.engine.StandardJMeterEngine: All thread groups have been started <br />2013/01/11 12:09:57 INFO - jmeter.threads.JMeterThread: Thread started: Content Thread Group 1-1 <br />2013/01/11 12:09:57 INFO - jmeter.threads.JMeterThread: Thread finished: Content Thread Group 1-1 <br />2013/01/11 12:09:57 INFO - jmeter.engine.StandardJMeterEngine: Notifying test listeners of end of test <br />2013/01/11 12:09:58 WARN - jmeter.engine.StandardJMeterEngine: Error encountered during shutdown of jan.mongometer.ScriptSampler@14607108 java.lang.NullPointerException<br /> at jan.mongometer.ScriptSampler.testEnded(ScriptSampler.java:330)<br /> at jan.mongometer.ScriptSampler.testEnded(ScriptSampler.java:322)<br /> at org.apache.jmeter.engine.StandardJMeterEngine.notifyTestListenersOfEnd(StandardJMeterEngine.java:224)<br /> at org.apache.jmeter.engine.StandardJMeterEngine.run(StandardJMeterEngine.java:436)<br /> at java.lang.Thread.run(Thread.java:722)<br /><br />2013/01/11 12:09:58 INFO - jmeter.gui.util.JMeterMenuBar: setRunning(false,*local*) Anonymoushttps://www.blogger.com/profile/02937399296747649720noreply@blogger.comtag:blogger.com,1999:blog-3132785414967539357.post-84690776133113137292013-01-11T07:51:58.605+00:002013-01-11T07:51:58.605+00:00Hi Ralph,
Would be great if you could give an exa...Hi Ralph,<br /><br />Would be great if you could give an example of what you're trying to do.<br /><br />Caveat, this is by no means a mature code base - in fact I'd say this is a first cut, just to see if it was possible and designed to work on relatively simple scripts.<br /><br />The source code is in gitub, and I encourage you to play with it and add functionality to cover any shortcomings (of which there will be many) and fix any bugs.<br /><br />That being said, if I find any time over the wekend, I'll take a look.Anonymoushttps://www.blogger.com/profile/14335719314813410020noreply@blogger.comtag:blogger.com,1999:blog-3132785414967539357.post-15473100500286234852013-01-11T02:38:36.179+00:002013-01-11T02:38:36.179+00:00Hi Jan, I am getting the same symptom that archie ...Hi Jan, I am getting the same symptom that archie mentions on 7 July 2012 00:58 and 26 June 2012 18:30. This prevents me from having multiple mongodb script instances in the same thread. Have you had a chance to fix this?Anonymoushttps://www.blogger.com/profile/02937399296747649720noreply@blogger.comtag:blogger.com,1999:blog-3132785414967539357.post-1372757038021132262012-07-07T00:58:04.247+01:002012-07-07T00:58:04.247+01:00Thank you Jan.
This is the jmx file:
https://www.d...Thank you Jan.<br />This is the jmx file:<br />https://www.dropbox.com/sh/jdwgub72wkrvsyd/5xzG4UvWIx<br /><br />There are two samples, sample-1 sends request to local db-1; sample-2 sends request to local db-2.<br />If both samples enabled, only the second one gets response from the db; the first sample returns [].<br />Each sample works ok if another is disabled.archiehttps://www.blogger.com/profile/16847404125370719677noreply@blogger.comtag:blogger.com,1999:blog-3132785414967539357.post-64193443393593473072012-07-06T19:44:49.298+01:002012-07-06T19:44:49.298+01:00Hi @archie.
If you can post some of your samples ...Hi @archie.<br /><br />If you can post some of your samples (obfuscated for security reasons of course) and let me know what you're getting and what you're expecting, then I'm happy to take a look.Anonymoushttps://www.blogger.com/profile/14335719314813410020noreply@blogger.comtag:blogger.com,1999:blog-3132785414967539357.post-69616428416617079262012-07-06T19:43:14.194+01:002012-07-06T19:43:14.194+01:00Thanks Anonymous. Glad it could be of some help t...Thanks Anonymous. Glad it could be of some help to you.Anonymoushttps://www.blogger.com/profile/14335719314813410020noreply@blogger.comtag:blogger.com,1999:blog-3132785414967539357.post-30633018882293221692012-07-06T18:02:33.845+01:002012-07-06T18:02:33.845+01:00Hi Jan,
I've beed using your extension for a w...Hi Jan,<br />I've beed using your extension for a week already; everything works as expected.<br />Thank you again.<br /><br />It would be great if you ever have time to find out why whith multiple mongodb samples only the last one returns response data.archiehttps://www.blogger.com/profile/16847404125370719677noreply@blogger.comtag:blogger.com,1999:blog-3132785414967539357.post-34207121819617799432012-07-06T11:44:40.156+01:002012-07-06T11:44:40.156+01:00Great post, everything I needed to know written ex...Great post, everything I needed to know written extremely succinctly. Good job!Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-3132785414967539357.post-17568893482271019172012-06-26T18:59:02.130+01:002012-06-26T18:59:02.130+01:00Great stuff @archie.
Let me know if you come acro...Great stuff @archie.<br /><br />Let me know if you come across any issues or if you find any limitations or think of a way you'd find value in further development of mongometer.Anonymoushttps://www.blogger.com/profile/14335719314813410020noreply@blogger.com