generating report from partial simulation.log

Hello,

I am trying to generating results from partial simulation log, but every time i have an exception:

prompt: ./gatling.sh -ro ~/Tools/gatling/results/dev_s20_r30020120711004222/ -rf ~/Tools/gatling/results/dev_s20_r30020120711004222/
GATLING_HOME is set to /home/xxx/Tools/gatling
Generating reports…

10:59:48.845 [WARN ] c.e.e.g.c.r.r.FileDataReader - Expecting one and only one RunRecord
Exception in thread “main” java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:532)
at com.excilys.ebi.gatling.core.result.reader.DataReader$.newInstance(DataReader.scala:23)
at com.excilys.ebi.gatling.charts.report.ReportsGenerator$.generateFor(ReportsGenerator.scala:59)
at com.excilys.ebi.gatling.app.Gatling.com$excilys$ebi$gatling$app$Gatling$$generateReports(Gatling.scala:268)
at com.excilys.ebi.gatling.app.Gatling$$anonfun$start$1.apply(Gatling.scala:117)
at com.excilys.ebi.gatling.app.Gatling$$anonfun$start$1.apply(Gatling.scala:117)
at scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:59)
at scala.collection.immutable.List.foreach(List.scala:76)
at com.excilys.ebi.gatling.app.Gatling.start(Gatling.scala:117)
at com.excilys.ebi.gatling.app.Gatling$.main(Gatling.scala:69)
at com.excilys.ebi.gatling.app.Gatling.main(Gatling.scala)
Caused by: java.util.NoSuchElementException: next on empty iterator
at scala.collection.Iterator$$anon$3.next(Iterator.scala:27)
at scala.collection.Iterator$$anon$3.next(Iterator.scala:25)
at scala.collection.IndexedSeqLike$Elements.next(IndexedSeqLike.scala:63)
at scala.collection.IterableLike$class.head(IterableLike.scala:90)
at scala.collection.mutable.ArrayBuffer.scala$collection$IndexedSeqOptimized$$super$head(ArrayBuffer.scala:47)
at scala.collection.IndexedSeqOptimized$class.head(IndexedSeqOptimized.scala:121)
at scala.collection.mutable.ArrayBuffer.head(ArrayBuffer.scala:47)
at com.excilys.ebi.gatling.charts.result.reader.FileDataReader.(FileDataReader.scala:91)
… 14 more

Using gatling 1.2.3
I have Scala version 2.9.1 (OpenJDK Server VM, Java 1.6.0_24) on Ubuntu 12.04

But in gatling/lib there is scala-library2.9.2, i suppose gatling is using this one?

Any ideas?

Hi Tomasz,

It seems that your simulation.log contains 2 RUN records. Could you post the 10 first lines of your simulation.log please ?

Cheers,
Romain

Hi Tomasz,

It seems that your simulation.log contains 2 RUN records. Could you post the 10 first lines of your simulation.log please ?

RUN 20120711004222 dev_s20_r300
ACTION 1 page per user, prices drop page 1 Start of scenario 1341960144745 1341960144745 1341960144745 1341960144745 OK Start of scenario
ACTION 2 pages per user 1 Start of scenario 1341960144747 1341960144747 1341960144747 1341960144747 OK Start of scenario
ACTION 1 page per user, search page 1 Start of scenario 1341960144747 1341960144747 1341960144747 1341960144747 OK Start of scenario
ACTION 1 page per user, category page 1 Start of scenario 1341960144748 1341960144748 1341960144748 1341960144748 OK Start of scenario
ACTION 1 page per user, main page 1 Start of scenario 1341960144748 1341960144748 1341960144748 1341960144748 OK Start of scenario
ACTION 1 page per user, product page 1 Start of scenario 1341960144756 1341960144756 1341960144756 1341960144756 OK Start of scenario
ACTION 2 pages per user 1 Start of scenario 1341960144756 1341960144756 1341960144756 1341960144756 OK Start of scenario
ACTION 2 pages per user 1 Start of scenario 1341960144767 1341960144767 1341960144767 1341960144767 OK Start of scenario
ACTION 4 pages per user 1 Start of scenario 1341960144767 1341960144767 1341960144767 1341960144767 OK Start of scenario

I’ve searched for others lines starting with “RUN”, but there is only one

Hmm strange.

Actually, the test is != 1, so there might be 0 RUN record detected then :confused: Thus the exception (as there’s no RUN record in the list (in the code), head cannot be resolved).

I cannot do more than read the code (can’t test anything) at this time.

One thing you could try is to update Gatling to 1.2.5 and see if there’s any improvement.

If it doesn’t work, it may have something to do with the command line flags (it’s the only thing I can guess from where I stand). Trying to put the files in Gatling’s folder tree could also be a solution (or at least could help us see what’s wrong ;))

Cheers,
Romain

Hi there,

Tomasz, how did you get those 2 files? Did you try to run a kind-of cluster? Did you manually remove the RUN line in the second file yourself?

Cheers,

Stéphane

No, there is no cluster involved, all is runned from one machine.
I’ve noticed that in simulation.log there is much more “Start of scenario” than “End of scenario” => i assume that test was interrupted in the middle (it was runned via cron), so maybe result file is malformed? How gatling works with impartial log files?

Cheers

Tomasz

Yes, if you don’t have the same number of Start and End, it means your test was interrupted. Did you get any stacktrace?
Gatling has no problem handling partial files and malformed lines are just skipped with a warning. When I say “no problem”, I mean “as long as it contains 1 record of type RUN”. This record contains informations on the run, like the optional name you can fill in when starting.

In your case, your second file doesn’t contain such a record.
So there’s 2 points that puzzle me:

  • where does this second file come from?
  • why the hell doesn’t it contain no RUN record?

If your want to generate the reports for your first file, remove the second one from the directory and re-run Gatling with the -ro (reports only) option:
https://github.com/excilys/gatling/wiki/Configuration#wiki-cli-options

Cheers,

Stéphane

2012/7/25 Tomasz Słomiński <tomasz.slominski@gmail.com>

I checked your first mail and realized you already knew about the command options.
Just one thing: -rf is just used when running the simulation if you want to force the output directory, so if you want to regenerate the reports, you only have to type:
./gatling.sh -ro ~/Tools/gatling/results/dev_s20_r30020120711004222

Stéphane

2012/7/25 Stéphane Landelle <slandelle@excilys.com>

Sorry, back from vacation, and it seems my brain is still not completely fixed.
So:

  • you only have one simulation.log file (don’t know where I got the idea you have 2 files)
  • -ro doesn’t currently take a folder PATH but a folder NAME. So what you have to type is ./gatling.sh -ro dev_s2****0_r30020120711004222 and you should be fine
    We will add a check if the file indeed exists.

Cheers,

Stéphane

2012/7/25 Stéphane Landelle <slandelle@excilys.com>

FYI, I opened this ticket:
https://github.com/excilys/gatling/issues/612

2012/7/25 Stéphane Landelle <slandelle@excilys.com>

It works now, thanks!
I think that current help is a little bit misleading (-sf takes full path for instance, and both -ro and -sf uses the very same “folderName”) - is there any page precising command-line parameters?

Cheers

I completely agree, that’s why I opened this issue and updated the wiki page:
https://github.com/excilys/gatling/issues/614
https://github.com/excilys/gatling/wiki/Configuration#wiki-cli-options

Glad it works for you now. Just don’t know why your process was killed though.

Cheers,

Stéphane

2012/7/26 Tomasz Słomiński <tomasz.slominski@gmail.com>

Nothing to do with gatling per se - tested server has died so test was
interrupted to make standard recovery procedure possible.
BTW, is there an option to stop test when percentage of fails reaches
certain level?

Cheers
Tomasz

As of now, no.
We’re currently investigating live statistics that could help for this, so maybe in a future version.

2012/7/26 Tomasz Słomiński <tomasz.slominski@gmail.com>