Created
July 17, 2012 14:37
-
-
Save woodbridge/3129776 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'pivotal-tracker' | |
| require './lib/formats/large_text' | |
| require 'benchmark' | |
| KEY = '1cce9f8bc294bcd160a7767304da5b68' | |
| PivotalTracker::Client.token = KEY | |
| PivotalTracker::Client.use_ssl = true | |
| test_proj = PivotalTracker::Project.find(398049) | |
| def story_set_of_size(proj, n) | |
| stories = proj.stories.all | |
| ret = [] | |
| n.times { ret << stories.sample } | |
| ret | |
| end | |
| Benchmark.bm do |b| | |
| b.report "10 stories" do | |
| stories = story_set_of_size test_proj, 10 | |
| LargeTextCardPrinter.new(stories, "10").write_to | |
| end | |
| b.report "30 stories" do | |
| stories = story_set_of_size test_proj, 30 | |
| LargeTextCardPrinter.new(stories, "30").write_to | |
| end | |
| b.report "60 stories" do | |
| stories = story_set_of_size test_proj, 60 | |
| LargeTextCardPrinter.new(stories, "60").write_to | |
| end | |
| # b.report "500 stories" do | |
| # stories = story_set_of_size test_proj, 500 | |
| # LargeTextCardPrinter.new(stories, "500").write_to | |
| # end | |
| # | |
| # b.report "1000 stories" do | |
| # stories = story_set_of_size test_proj, 1000 | |
| # LargeTextCardPrinter.new(stories, "1000").write_to | |
| # end | |
| # | |
| # b.report "10,000 stories" do | |
| # stories = story_set_of_size test_proj, 10000 | |
| # LargeTextCardPrinter.new(stories, "10,000").write_to | |
| # end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment