Commit Graph

8 Commits

Author SHA1 Message Date
Pavol Vaskovic
9852e9a32a [benchmark] Extracted LogParser class 2018-08-17 00:32:04 +02:00
Pavol Vaskovic
0b990a82a5 [benchmark] Extracted test_utils.py
Moving the `captured_output` function to own file.

Adding homegrown unit testing helper classes `Stub` and `Mock`.

The issue is that the unittest.mock was added in Python 3.3 and we need to run on Python 2.7. `Stub` and `Mock` were organically developed as minimal implementations to support the common testing patterns used on the original branch, but since I’m rewriting the commit history to provide an easily digestible narrative, it makes sense to introduce them here in one step as a custom unit testing library.
2018-08-16 20:08:34 +02:00
Pavol Vaskovic
179b12103f [benchmark] Refactor formatting responsibilities
Moved result formatting methods from `PerformanceTestResult` and `ResultComparison` to `ReportFormatter`, in order to free PTR to take more computational responsibilities in the future.
2018-08-16 17:44:59 +02:00
Pavol Vaskovic
686c761992 One more typo fix. 2017-06-04 18:48:19 +02:00
Pavol Vaskovic
dea7d8fe77 Consistent --output; Improved coverage: main()
Coverage at 99% according to coverage.py

* `compare_perf_tests.py` now always outputs the same format to stdout as is written to `--output` file
* Added integration test for the main() function
* Added tests for console output (and suppressed it leaking during testing)
* Fixed file name in test’s file header
2017-06-04 18:31:06 +02:00
Pavol Vaskovic
9265a71ac6 Improved coverage: ReportFormatter
Coverage at 87% according to coveragy.py

Also fixed spelling errors in documentation.
2017-06-02 02:28:44 +02:00
Pavol Vaskovic
d178b6e0cd Improved coverage with more tests: parse_args
Coverage at 66% according to coveragy.py
2017-06-01 22:19:33 +02:00
Pavol Vaskovic
49ddd96c83 Added documentation and test coverage.
compare_perf_test.py is now covered with unit tests and public methods are documented in the implementation.

Minor refactoring  to better conform to Python conventions:
* classes declared in new style
* proper private method prefix of single underscore
* replacing map with list comprehension where it was clearer

Unit test are executed as part of validation-test.

.gitignore was modified to ignore .coverage and htmlcov artifacts generated by the coverage.py package
2017-06-01 20:05:40 +02:00