Skip to content

Added documentation and test coverage. #10035

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jun 5, 2017

Conversation

palimondo
Copy link
Contributor

@palimondo palimondo commented Jun 1, 2017

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

@palimondo
Copy link
Contributor Author

palimondo commented Jun 1, 2017

@shahmishal @gottesmm Please review 🙏

@palimondo
Copy link
Contributor Author

palimondo commented Jun 1, 2017

I have force-pushed fix for lint complaints.

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
@CodaFi
Copy link
Contributor

CodaFi commented Jun 1, 2017

@swift-ci please python lint

Coverage at 66% according to coveragy.py
@shahmishal
Copy link
Member

@swift-ci please smoke test

Copy link
Collaborator

@xwu xwu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spelling and grammar nits.

from Swift Benchmark Suite as reported by test driver (Benchmark_O,
Benchmark_Onone, Benchmark_Ounchecked or Benchmark_Driver).

It depends on the log format emmited by the test driver in the form:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo: the correct spelling is "emitted"

It depends on the log format emmited by the test driver in the form:
#,TEST,SAMPLES,MIN(μs),MAX(μs),MEAN(μs),SD(μs),MEDIAN(μs),MAX_RSS(B)

The last column, MAX_RSS, is emmited only for runs instrumented by the
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same typo

@@ -21,8 +21,22 @@
from math import sqrt


class PerformanceTestResult:
class PerformanceTestResult(object):
"""PerformanceTestResult holds results from executing individual benchmark
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing articles: "from executing an individual benchmark from the Swift Benchmark Suite..."

Coverage at 87% according to coveragy.py

Also fixed spelling errors in documentation.
@palimondo
Copy link
Contributor Author

palimondo commented Jun 2, 2017

@shahmishal Sorry for pushing another change while the smoke test was running, but I'd hate to open extra PR just to fix the grammar nits @xwu brought up. I had a couple more test ready, so I slipped those in, too. Please re-🚬

I'm going to sleep now, so the branch should be stable for the next few hours 😇

@palimondo
Copy link
Contributor Author

@gottesmm Is the unit test integration with validation-test done OK here? How about the placement of test themselves? You didn't comment on that aspect on #9999. Can you review this, please?

@shahmishal
Copy link
Member

@swift-ci please smoke test

@palimondo
Copy link
Contributor Author

@shahmishal @gottesmm @dabrahams @eeckstein @atrick Can somebody please review and merge this? Otherwise I can't help myself and will keep tinkering with it...

@palimondo
Copy link
Contributor Author

@CodaFi @natecook1000 Could you? ^^

@dabrahams
Copy link
Contributor

@swift-ci Please test and merge

@dabrahams
Copy link
Contributor

@palimondo This really should be run through the full validation suite, but if that passes, it will merge.

Thanks for your hard work on this!

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
@palimondo
Copy link
Contributor Author

palimondo commented Jun 4, 2017

OMG, Sorry @dabrahams, I haven't seen your response (GitHub didn't update until I refreshed browser) and I pushed a final commit. Could you please re-run the CI?

@palimondo
Copy link
Contributor Author

Ah, I'm so clumsy... fixing everything in 1000 steps. I would have force pushed, but it seems to mess with CI, requiring it to run twice, so I added two more commits instead. 🤦‍♂️

@natecook1000
Copy link
Member

@swift-ci Please test and merge

@palimondo
Copy link
Contributor Author

@natecook1000 You can test, but not merge?

@palimondo
Copy link
Contributor Author

@practicalswift Any idea why this didn't merge after passing the test?

@shahmishal shahmishal merged commit 8d63856 into swiftlang:master Jun 5, 2017
@palimondo
Copy link
Contributor Author

@shahmishal Thanks for the merge!

@palimondo palimondo deleted the got-you-covered branch June 5, 2017 20:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants