# Getting simulation result in after block simulation

**URL:** <https://community.gatling.io/t/getting-simulation-result-in-after-block-simulation/3209>\
**Category:** Gatling (Open-Source)\
**Created:** [August 23, 2016, 4:14pm UTC](https://community.gatling.io/t/getting-simulation-result-in-after-block-simulation/3209 "2016-08-23T16:14:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mathieu\_Roger](https://avatars.discourse-cdn.com/v4/letter/m/eb9ed0/32.png) [@Mathieu\_Roger](https://community.gatling.io/u/Mathieu_Roger)\
**Post date:** [August 23, 2016, 4:14pm UTC](https://community.gatling.io/t/getting-simulation-result-in-after-block-simulation/3209/1 "2016-08-23T16:14:03Z")

</div>

Hello!

In order to store and compare data between simulation, I want to retrieve statistics information after the simulation run. (first orange block in report)

I want to do that (if possible) in the after{…} simulation hook.

If I understand the code I have to :

> > val logFileReader = new LogFileReader(blabla)  
> > val total = logFileReader.requestGeneralStats(requestName, group, None)

But I have many questions :

- How can I retrive the runId in the after hook in order to give him to LogFileReader ?
- This process parse the simulation.log file, in the after block is he fully written?
- Is there any better method to achieve my needs?

Many thanks!

---

<div class="post-metadata">

**Author:** ![slandelle](https://dub1.discourse-cdn.com/flex013/user_avatar/community.gatling.io/slandelle/32/4_2.png) [@slandelle](https://community.gatling.io/u/slandelle)\
**Post date:** [August 23, 2016, 7:31pm UTC](https://community.gatling.io/t/getting-simulation-result-in-after-block-simulation/3209/2 "2016-08-23T19:31:20Z")

</div>

>
