Table of Contents
This personal project is meant to be a developer tool, aimed at mass running functions, storing their runtimes as CSV data, aggregating it, and using a GUI to create a graph of this data. This tool is pip installable, making it extremely easy for Python developers to use.
pip
pip --version
Simply pip install the module
pip install runmetricsvisualizer
from runmetricsvisualizer.runmetrics import RunMetrics
Runs a specified function desired amount of times, outputs runtime data to CSV file as provided by user. Uses *args and **kwargs for function parameters.\
RunMetrics.run(function, output_csv_file, *function_args, function_run_count, **function_kwargs)
Example
# our function
def do_something(num, iterations):
for x in range(num):
sum([x**4 for x in range(iterations)])
# (num = 100, iterations = 1000) Will generate 50 datapoints
RunMetrics.run(do_something, 'data/test.csv', 100, 1000, count=50)
Opens a Tkinter-generated GUI window for customizing graph settings: datapoint colors, chart style, background theme, and chart title.
RunMetrics.plot(CSVfile_to_plot_from)
Example
RunMetrics.plot('data/test.csv')
# opens the following GUI menu
See the open issues for a full list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE.txt
for more information.
Rahul Vikram - LinkedIn