vbench: lightweight performance testing for Python

  • 26,595 views
Uploaded on

 

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
26,595
On Slideshare
0
From Embeds
0
Number of Embeds
6

Actions

Shares
Downloads
14
Comments
0
Likes
1

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. vbench: lightweight performance testing Wes McKinney @wesmckinn PyCon 2012Sunday, March 11,
  • 2. Why do we test?Sunday, March 11,
  • 3. Freedom from fearSunday, March 11,
  • 4. Testing for performance?Sunday, March 11,
  • 5. Who made my code slower???Sunday, March 11,
  • 6. Sunday, March 11,
  • 7. Who made my code slower???Sunday, March 11,
  • 8. MeSunday, March 11,
  • 9. speed.pypy.org is a one-off solutionSunday, March 11,
  • 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. Catch performance regressions soonerSunday, March 11,
  • 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. 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. 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. GitHub: wesm/vbench @wesmckinnSunday, March 11,