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.
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.
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.