![]() ![]() get_resources_plot(width: int, height: int).Returns different statistics (mean, stdev, min, max) for all types of values over different iterations. Also calculates the average of the time series data. Returns the average for all types of value over different iterations. Returns object containing lists for each type of value over different iterations. Returns the result for all of the iterations in the benchmark results object. Returns the first iteration result in the benchmark results object. Returns a generator object allowing you to obtain a BenchmarkResults after each iteration of benchmarking until done (useful for monitoring the progress and recieving benchmarking data on the go).Returns a BenchmarkResults object containing the related results.īenchmark_command_generator(command: str, interations_num = 1, raw_data = False).raw_data: Whether or not to show all different info from different sources like psutil and GNU Time (if available).iterations_num: Number of times to measure the program's resources.Documentation benchmark_command(command: str, iterations_num = 1, raw_data = False) get_first_iteration () > first_iteration_result Usage IPython notebookįor a more comprehensive demonstration on how to use the library and the resources plot, check the provided ipython notebook. benchmark_command ( "stress -cpu 10 -timeout 5", iterations_num = 20 ) > first_iteration_result = benchmark_results. > import cmdbench > benchmark_results = cmdbench. But prints only the first one from the benchmark results. You can simply use the benchmark_command function to benchmark a command.īenchmarks the command stress -cpu 10 -timeout 5 over 20 iterations. The output plot file plot.png for the demo will look like: In the following demo, the command node test.js (a slightly modified version of test.js) is being benchmarked 10 times, average of resources are being printed and a plot for the command's cpu and memory usage is being saved to the file plot.png. You can use the CLI provided by the python package to benchmark any command. Python compatibility: 2.7 or >=3.4 Table of contents To install the library from this github repository execute the following command in your terminal: pip install cmdbench Create an issue in case you run into a problem. ![]() But Windows and macOS are also supported. Note: This library is written in, heavily tested and maintained for the Linux operating system primarily. A quick and easy benchmarking tool for any command's CPU, memory and disk usage.ĬLI and the library functionalities are both provided.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |