vbench: lightweight                    performance testing                          Wes McKinney                          ...
Why do we test?Sunday, March 11,
Freedom from fearSunday, March 11,
Testing for                    performance?Sunday, March 11,
Who made my code slower???Sunday, March 11,
Sunday, March 11,
Who made my code slower???Sunday, March 11,
MeSunday, March 11,
speed.pypy.org is a                     one-off solutionSunday, March 11,
Stop. Help is near                    • GitHub: wesm/vbench                    • Integrates with git: runs benchmarks for ...
Catch performance                    regressions soonerSunday, March 11,
Writing vbenchmarks             setup = common_setup + """ setup             values = np.concatenate([np.arange(100000),  ...
Use them in your                       workflow                In [2]: stats_rank_average.run()                Out[2]:     ...
Get involved                    • A useful weekend hack                    • git bisect integration                    • M...
GitHub: wesm/vbench                       @wesmckinnSunday, March 11,
Upcoming SlideShare
Loading in...5
×

vbench: lightweight performance testing for Python

28,757

Published on

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
28,757
On Slideshare
0
From Embeds
0
Number of Embeds
8
Actions
Shares
0
Downloads
25
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Transcript of "vbench: lightweight performance testing for Python"

  1. 1. vbench: lightweight performance testing Wes McKinney @wesmckinn PyCon 2012Sunday, March 11,
  2. 2. Why do we test?Sunday, March 11,
  3. 3. Freedom from fearSunday, March 11,
  4. 4. Testing for performance?Sunday, March 11,
  5. 5. Who made my code slower???Sunday, March 11,
  6. 6. Sunday, March 11,
  7. 7. Who made my code slower???Sunday, March 11,
  8. 8. MeSunday, March 11,
  9. 9. speed.pypy.org is a one-off solutionSunday, March 11,
  10. 10. Stop. Help is near • GitHub: wesm/vbench • Integrates with git: runs benchmarks for each revision in your repo • Persists results locally in SQLite • Generates graphs using matplotlibSunday, March 11,
  11. 11. Catch performance regressions soonerSunday, March 11,
  12. 12. Writing vbenchmarks setup = common_setup + """ setup values = np.concatenate([np.arange(100000), np.random.randn(100000), np.arange(100000)]) s = Series(values) """ stats_rank_average = Benchmark(s.rank(), setup)Sunday, March 11,
  13. 13. Use them in your workflow In [2]: stats_rank_average.run() Out[2]: {loops: 10, repeat: 3, succeeded: True, timing: 33.135390281677246, units: ms} Same code as %timeit in IPythonSunday, March 11,
  14. 14. Get involved • A useful weekend hack • git bisect integration • More version control systems • Upload results to codespeed instance • More setup/teardown controlSunday, March 11,
  15. 15. GitHub: wesm/vbench @wesmckinnSunday, March 11,
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×