Re: User defined mean test times
Philip Aston <[email protected]>
| Newsgroups | gmane.comp.java.grinder.user |
|---|---|
| Message-ID | <CANf-6Qwu_-yCWoJkKQfTfEaa4gmdFvLuPdV1CJPBa1usGaJscw@mail.gmail.com> |
If you look in the log file, you'll see a full stack trace for the exception, probably including the cause. Can you post that here please? On 3 Dec 2013 04:06, "[email protected]" <[email protected]> wrote: > Hello, > I have a scenario where I have to separate out 200 responses from the 304 > responses and record mean test times for each. However, it so happens that > unless i make a request, i do not know if its a 200 or 304. Here is what I > am currently doing. (Not working though) > > -------------------------------------------------------------- > > grinder.statistics.registerDataLogExpression("200 response", "userLong0") > grinder.statistics.registerDataLogExpression("304 response", "userLong1") > grinder.statistics.registerSummaryExpression("Mean 200 response", "(/ (sum > userLong0) (count userLong0) )") > grinder.statistics.registerSummaryExpression("Mean 304 response", "(/ (sum > userLong1) (count userLong1) )") > > Class X: > def getFeed(self): > feeduri = "abc.com/feeds" > result = feedrequest.GET(feedUri) > testStatistics = grinder.statistics.forCurrentTest > timetogetfeed = testStatistics.getTime() > if result.getStatusCode() == 200: > etag = result.getHeader('ETag') > userObject.setEtag(etag) > print "---------------- 200 : ",timetogetfeed > testStatistics.addLong("userLong0", timetogetfeed) > elif result.getStatusCode() == 304: > print "---------------- 304 : ", timetogetfeed > testStatistics.addLong("userLong1", timetogetfeed) > > > Test(100, 'feed request 123').record(X.getFeed) > -------------------------------------------------------------- > > What am i doing wrong here..? The expression gives an exception at > RegisterSummaryExpression (given below). > > net.grinder.scriptengine.jython.JythonScriptExecutionException: Java > exception initialising test script > grinder.statistics.registerSummaryExpression("Mean 200 response", > "(/ (sum userLong0) (count userLong0) )") > File > "C:\Users\reddys.ADS\.\HYDCNU304BWC0-file-store\current\a360utility.py", > line 79, in <module> > from a360utility import A360Utility > > > > -- > View this message in context: > http://grinder.996249.n3.nabble.com/User-defined-mean-test-times-tp8712.html > Sent from the Grinder - User mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------------ > Rapidly troubleshoot problems before they affect your business. Most IT > organizations don't have a clear picture of how application performance > affects their revenue. With AppDynamics, you get 100% visibility into your > Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics > Pro! > http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk > _______________________________________________ > grinder-use mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/grinder-use > ------------------------------------------------------------------------------ Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk _______________________________________________ grinder-use mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/grinder-use