Commit Graph

294 Commits

Author SHA1 Message Date
practicalswift
ee871c7938 [python] Bring code base in line with PEP-8 again 2016-09-16 19:33:04 +02:00
practicalswift
4485f76794 [gardening] Use consistent capitalization for "Objective-C". 2016-06-14 22:24:43 +02:00
practicalswift
e8c4e1dd24 [gardening] Fix PEP 8 regression. 2016-04-02 11:31:07 +02:00
Erik Eckstein
12f38252d9 compare_perf_tests script: Fix two minor bugs
1) --changes-only didn't have an effect on formats other than html
2) a wrong-format error was printed even if the format name was correct
2016-04-01 14:18:29 -07:00
Erik Eckstein
d628cced3d compare_perf_tests script: Fix bug when calculating the minimum/maximum of multiple samples
Instead of the minimum always the last sample was taken.
2016-04-01 14:18:29 -07:00
practicalswift
11a8b6c2ba [gardening] Daily cleanup: typos, header formatting. 2016-03-28 09:29:38 +02:00
practicalswift
d00a5ef814 [gardening] Weekly gardening: typos, duplicate includes, header formatting, etc. 2016-03-24 22:41:10 +01:00
practicalswift
1f90412532 [Python] Remove unused function nthroot. Use sys.exit(…) instead of exit(…) 2016-03-22 21:34:41 +01:00
Mishal Shah
cb23837bb9 [Compare Perf] Add support for markdown and html 2016-03-21 18:08:08 -07:00
practicalswift
1edb62dc38 [Python] Make flake8 linting pass without errors/warning (w/ default rules) 2016-03-13 20:19:51 +01:00
practicalswift
9c8a01c214 [Python] Remove unused methods get_{data,output,status}() 2016-03-12 20:21:16 +01:00
practicalswift
8bf6df8539 Merge pull request #1615 from practicalswift/remove-global-ignores-add-local-noqa
[Python] Replace global linting excludes with local line-level excludes ("noqa")
2016-03-11 14:42:15 +01:00
Mishal Shah
f89c70135b Merge pull request #1624 from shahmishal/master
[Perf script] Fix output format for compare script
2016-03-10 11:56:55 -08:00
Mishal Shah
fcbea8bd90 [Perf script] Fix output format for compare script 2016-03-10 11:54:27 -08:00
practicalswift
d5326bfdc4 [Python] Replace global linting excludes with local line-level excludes ("noqa")
Replace the project global linting rule excludes (as defined in .pep8) with
fine-grained "# noqa" annotations.

By using noqa annotation the excludes are made on a per line basis instead of
globally.

These annotations are used where we make deliberate deviations from the standard
linting rules.

To lint the Python code in the project:

  $ flake8

To install flake8:

  $ pip install flake8

See https://flake8.readthedocs.org/en/latest/ for details.

To enable checking of the PEP-8 naming conventions, install the optional
extension pep8-naming:

  $ pip install pep8-naming

To enable checking of blind "except:" statements, install the optional
extension flake8-blind-except:

  $ pip install flake8-blind-except

To enable checking of import statement order, install the optional
extension flake8-import-order:

  $ pip install flake8-import-order
2016-03-10 16:22:48 +01:00
practicalswift
a1156e1854 [Python] Fix recently introduced linting (flake8) regression. 2016-03-10 13:51:17 +01:00
practicalswift
0796eaad1f [Python] Fix 80-column violations 2016-03-09 23:52:11 +01:00
Mishal Shah
046f0636b2 Fix compare_perf_tests.py to support python 3 2016-03-09 14:02:16 -08:00
Michael Gottesman
9c998d7ce8 [leaks-runner] Get more accurate results by subtracting two differing iteration counts.
Previously, we had some white listing lists for allocations that were assigned
into globals during a benchmarks running. Now we instead run two different
iterations with the second running an additional time. Then we subtract the
counts.

This enables me to get rid of the whitelist.
2016-03-09 12:56:15 -08:00
Michael Gottesman
ccc8791581 [leaks-checker] Add support for filtering tests and changing the number of samples/iters run. This will make it easy to bisect using the Benchmark_LeaksRunner script. 2016-03-09 10:28:00 -08:00
Michael Gottesman
e232456bf0 [leaks-runner] Print out the RC delta with the results. 2016-03-09 00:37:14 -08:00
practicalswift
30b66ea036 Merge pull request #1584 from practicalswift/python-3-compatible-print
[Python] Use Py3k compatible print operator: print "foo" → print("foo")
2016-03-09 08:00:49 +01:00
Michael Gottesman
0645b30caf Fix deadlock in leaks runner script. 2016-03-08 22:18:36 -08:00
Brian Gesiak
c9000af795 Merge pull request #1526 from practicalswift/fix-pep8-violations-ii
[Python] Fix five classes of PEP-8 violations (E101/E111/E128/E302/W191)
2016-03-08 23:55:46 -05:00
practicalswift
0fd0c48648 [Python] Use Py3k compatible print operator: print "foo" → print("foo") 2016-03-08 23:10:52 +01:00
practicalswift
e2de5c2202 [Python] Fix blind except: statements
Make sure all Python code in the repo specifies which exceptions to
catch when using `except:`.

Regressions can be catched using `flake8-blind-except` going forward.
2016-03-08 11:08:28 +01:00
practicalswift
265835fdfc [Python] Use consistent import ordering for Python code
Ordering used:
1.) standard library imports
2.) third party imports
3.) local package imports

Each group is individually alphabetized.
2016-03-07 23:25:16 +01:00
practicalswift
183da818df [Python] Fix five classes of PEP-8 violations (E101/E111/E128/E302/W191)
* E101: indentation contains mixed spaces and tabs
* E111: indentation is not a multiple of four
* E128: continuation line under-indented for visual indent
* E302: expected 2 blank lines, found 1
* W191: indentation contains tabs
2016-03-07 22:36:23 +01:00
Karoly Lorentey
d921b4e1bc [benchmark][SR-871] Convert duration strings to integers before calculating min/max
Benchmark_Driver used string comparison to calculate the minimum and maximum
of durations in benchmark results, sometimes leading to wildly inaccurate reports.
2016-03-03 22:34:54 +01:00
practicalswift
e33f1747a9 [Python] Improve Python consistency: "variable in function should be lowercase" (N806)
The repo contains roughly 80 Python scripts. "snake_case" naming is used for
local variables in all those scripts. This is the form recommended by the PEP 8
naming recommendations (Python Software Foundation) and typically associated
with idiomatic Python code.

However, in nine of the 80 scripts there were at least one instance of
"camelCase" naming prior to this commit.

This commit improves consistency in the Python code base by making sure that
these nine remaining files follow the variable naming convention used for
Python code in the project.

References:
* PEP 8: https://www.python.org/dev/peps/pep-0008/
* pep8-naming: https://pypi.python.org/pypi/pep8-naming
2016-03-02 18:56:47 +01:00
practicalswift
f6d6585ee0 [Python] Improve Python consistency: Use function_name(…) throughout (PEP8) 2016-02-29 22:49:19 +01:00
Andrew Trick
6bcbde2f1c [benchmark] Fix the comparison script to report possibly spurious data points.
When comparing scores from either multiple samples, or multiple runs,
print (?) if scores for the configurations being compared have
overlapping ranges.
2016-02-28 00:29:49 -08:00
Andrew Trick
4c3f4c617d Change benchmark score output to (?) for likely bogus data. 2016-02-27 21:56:29 -08:00
practicalswift
e395ea0f0e [Python] Follow standard Python docstrings conventions (PEP-0257).
https://www.python.org/dev/peps/pep-0257/
2016-02-20 17:11:57 +01:00
practicalswift
9b13c664cd [Python] Python class names should be CamelCase:d by convention 2016-02-19 21:28:51 +01:00
Luke Larson
d4ece4b4d0 [benchmark] Correctly depend on stdlib targets 2016-02-15 17:22:07 -08:00
practicalswift
87bcd45c9e [Python] Fix recently introduced PEP 8 regressions.
After this commit:

$ flake8
$

(No PEP 8 warnings or errors left in the repo.)
2016-02-10 22:23:49 +01:00
Luke Larson
b606297f83 [benchmark] Correct perf_test_driver class name 2016-02-10 12:02:39 -08:00
lplarson
15d94d1595 Merge pull request #1234 from practicalswift/benchmark-pep8-fixes
[Python] Bring new code in line with subset of PEP 8 used in project
2016-02-09 18:49:19 -08:00
Luke Larson
2c62011276 [benchmark] Don't hard code directory structure 2016-02-09 15:21:05 -08:00
Michael Gottesman
1c2f40e246 [perf-test] Add in the Benchmark_DTrace driver.
This and the associated *.d file can be used to determine dynamic
retain/release counts over the perf test suite.
2016-02-08 14:35:47 -08:00
practicalswift
576ef29629 [Python] Fix redundant list comprehensions in recently introduced code. 2016-02-08 20:54:20 +01:00
practicalswift
a7cbdb4ea5 Bring new Python code in line with subset of PEP 8 used in project. 2016-02-08 20:42:19 +01:00
Luke Larson
0356ec8ec3 Add Swift Benchmark Suite 2016-02-08 10:47:58 -08:00