4
votes

I am needing to compare my non-caching load test aggregate data to caching load test aggregate data to calculate how effective caching is for my website. I have successfully executed my tests with both non-caching and caching. The problem I have is that when using the Cache Manager, the aggregate does not include the number of requests utilizing the cache nor does it include the timing of cache retrieval. This is a problem because the throughput in the aggregate report is the same for both non-caching and caching load tests and I cannot compare efficiency without doing a bunch of manual calculation. Now, I understand that throughput represents actual requests hitting the server and receiving a response, but it isn't as useful as if the throughput included the number and time of cache retrieval. Is there a way to achieve this?

Thank You

PS: I'v looked all over Google and in the JMeter GUI with no success in finding an answer.

1

1 Answers

1
votes

I guess what you are looking for is modifying HTTP Cache Manager so that it returns a SampleResult as by default it doesn’t.

So add to user.properties:

  • cache_manager.cached_resource_mode=RETURN_CUSTOM_STATUS

  • RETURN_CUSTOM_STATUS.code=304

  • RETURN_CUSTOM_STATUS.message=Resource in cache

See: