get requestsPerSec as integer value

How can I get the above value in the main body of the program after the simulation, i.e. I want to write something vaguely like:

val rps: Int = global.stats.requestsPerSec.???

Ideas welcome :slight_smile:

Either parse the global_stats.json file that’s generated with the reports (look into the js directory), or wrap/fork Gatling’s main class.