# Simulation.log file

**URL:** <https://community.gatling.io/t/simulation-log-file/3836>\
**Category:** Gatling (Open-Source)\
**Created:** [July 20, 2017, 10:33am UTC](https://community.gatling.io/t/simulation-log-file/3836 "2017-07-20T10:33:15Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rajat\_Singh](https://avatars.discourse-cdn.com/v4/letter/r/cab0a1/32.png) [@Rajat\_Singh](https://community.gatling.io/u/Rajat_Singh)\
**Post date:** [July 20, 2017, 10:33am UTC](https://community.gatling.io/t/simulation-log-file/3836/1 "2017-07-20T10:33:15Z")

</div>

Hi folks,

Is it possible to get the total number of bytes downloaded when a request is executed in simulation.log file in Gatling.

Regards,

Rajat Singh

---

<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:** [July 20, 2017, 11:39am UTC](https://community.gatling.io/t/simulation-log-file/3836/2 "2017-07-20T11:39:01Z")

</div>

No, it’s not.  
FrontLine has bits/s sent and received by remote hosts though.

---

<div class="post-metadata">

**Author:** ![Barry\_Perez](https://avatars.discourse-cdn.com/v4/letter/b/7ba0ec/32.png) [@Barry\_Perez](https://community.gatling.io/u/Barry_Perez)\
**Post date:** [July 20, 2017, 12:03pm UTC](https://community.gatling.io/t/simulation-log-file/3836/3 "2017-07-20T12:03:34Z")

</div>

Hi,

Quick example - to get response status code and body length in simulation.log (you’ll need to perform any required analysis yourself as it won’t be included in the Gatling generated reports):

.get(someResourceUrl)  
.headers(headers)  
.extraInfoExtractor(extraInfo =\> List(extraInfo.response.statusCode.get, extraInfo.response.bodyLength))  
.check(status.is(200))  
)

Cheers,  
Barry

---

<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:** [July 20, 2017, 12:20pm UTC](https://community.gatling.io/t/simulation-log-file/3836/4 "2017-07-20T12:20:00Z")

</div>

This can be correct in some cases, typically internal, intra private network API calls.  
But it’s definitively wrong from most internet cases: what you have with response.bodyLength is not the number of bytes over the wire but the number of **decoded bytes**.  
What about compression and https encryption?

---

<div class="post-metadata">

**Author:** ![Rajat\_Singh](https://avatars.discourse-cdn.com/v4/letter/r/cab0a1/32.png) [@Rajat\_Singh](https://community.gatling.io/u/Rajat_Singh)\
**Post date:** [July 20, 2017, 1:00pm UTC](https://community.gatling.io/t/simulation-log-file/3836/5 "2017-07-20T13:00:55Z")

</div>

Thanks for the reply

we need the data for the trend analysis after every build as in simulation.log file starting time of request and ending time of the request is given so from that we can get the response time but for the throughput we need to get download bytes  
information from it .

Regards,

---

<div class="post-metadata">

**Author:** ![Rajat\_Singh](https://avatars.discourse-cdn.com/v4/letter/r/cab0a1/32.png) [@Rajat\_Singh](https://community.gatling.io/u/Rajat_Singh)\
**Post date:** [July 20, 2017, 1:18pm UTC](https://community.gatling.io/t/simulation-log-file/3836/6 "2017-07-20T13:18:56Z")

</div>

Thanks Barry

I tried in my script i am getting HTTP status code but in place of response body length it is showing value 0  
(I am hitting the [gatling.io](http://gatling.io) site and downloading all the resources in it)

Regards,

---

<div class="post-metadata">

**Author:** ![Barry\_Perez](https://avatars.discourse-cdn.com/v4/letter/b/7ba0ec/32.png) [@Barry\_Perez](https://community.gatling.io/u/Barry_Perez)\
**Post date:** [July 20, 2017, 1:43pm UTC](https://community.gatling.io/t/simulation-log-file/3836/7 "2017-07-20T13:43:20Z")

</div>

Probably related to the site using Chunked encoding - check the Gatling docs on that.

Please also take note of the good point Stéphane makes above: using this method is OK if you’re testing internal services (API calls etc) but not for internet type tests where compression and https is used.

Barry
