# POST perf testing with json message bodies in file

**URL:** <https://community.gatling.io/t/post-perf-testing-with-json-message-bodies-in-file/2499>\
**Category:** Gatling (Open-Source)\
**Created:** [August 31, 2015, 12:16am UTC](https://community.gatling.io/t/post-perf-testing-with-json-message-bodies-in-file/2499 "2015-08-31T00:16:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Narayanan\_K](https://avatars.discourse-cdn.com/v4/letter/n/a3d4f5/32.png) [@Narayanan\_K](https://community.gatling.io/u/Narayanan_K)\
**Post date:** [August 31, 2015, 12:16am UTC](https://community.gatling.io/t/post-perf-testing-with-json-message-bodies-in-file/2499/1 "2015-08-31T00:16:06Z")

</div>

Hi all,

I am performance testing an end point for a POST request. We have a file with 4000 POST body json messages one per line.  
How do I go about performance testing by firing POST requests with the JSON message bodies from the file ?

I read loading the whole file in memory would be costly, what is the preferred approach for this scenario ?

Thanks  
Narayanan

---

<div class="post-metadata">

**Author:** ![Abhinav\_Gogna](https://avatars.discourse-cdn.com/v4/letter/a/c0e974/32.png) [@Abhinav\_Gogna](https://community.gatling.io/u/Abhinav_Gogna)\
**Post date:** [August 31, 2015, 3:00pm UTC](https://community.gatling.io/t/post-perf-testing-with-json-message-bodies-in-file/2499/2 "2015-08-31T15:00:53Z")

</div>

1. Post JSON body - [http://gatling.io/docs/2.1.7/http/http\_request.html?highlight=asjson#request-body](http://gatling.io/docs/2.1.7/http/http_request.html?highlight=asjson#request-body) . There is a section about ELFileBody, which is what you are looking for.

2. How big is the file? - Gatling easily handles large files, since, it does not require a lot of resources for Perf testing.
