Your SlideShare is downloading. ×
vbench: lightweight performance testing for Python
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Saving this for later?

Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime - even offline.

Text the download link to your phone

Standard text messaging rates apply

vbench: lightweight performance testing for Python

27,662
views

Published on

Published in: Technology

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
27,662
On Slideshare
0
From Embeds
0
Number of Embeds
7
Actions
Shares
0
Downloads
18
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,