vanilla-php / benchmark-php

:rocket: A benchmark script for PHP and MySQL (Archived)
MIT License
192 stars 90 forks source link

Thanks and a small suggestion #9

Closed tripptuttle closed 5 years ago

tripptuttle commented 5 years ago

This is a super helpful script! Thank you. I'm adapting it slightly as a status monitor to allow my Kubernetes containers for a user research study to self-restart if certain test values are greater than what I'd like.

I noticed you are adding "secs" into the $result array in the benchmark tests functions. One minor suggestion would be to add on the string for the units in the print_benchmark_result() function. That way, the test results will be numeric and can be used for further processing. For example, I'll be using the values to determine the HTTP status code to return, as well as include the values as response headers.

odan commented 5 years ago

Hello @ttuttle15 Would it be helpful for you to generate a JSON result (with numbers) instead of an HTML page? I could add an URL parameter option for this.

odan commented 5 years ago

@ttuttle15 Ping