Skip to content

Instantly share code, notes, and snippets.

@benwbrum
Created October 27, 2015 21:16
Show Gist options
  • Select an option

  • Save benwbrum/7471fd27fa44d85c29a2 to your computer and use it in GitHub Desktop.

Select an option

Save benwbrum/7471fd27fa44d85c29a2 to your computer and use it in GitHub Desktop.
Distribution of search statistics showing that statistics are being calculated
irb(main):012:0> 0.upto(24).each { |i| p SearchStatistic.where(:year => 2015, :day => 24, :month => 10, :hour => i).count }
5
5
5
5
5
5
5
6
5
5
5
5
5
5
5
5
5
5
5
5
5
5
5
5
0
=> 0
irb(main):013:0> 0.upto(24).each { |i| p SearchStatistic.where(:year => 2015, :day => 25, :month => 10, :hour => i).count }
5
6
5
5
5
5
5
5
5
5
5
5
6
5
6
5
5
5
5
5
5
5
5
5
0
=> 0
irb(main):014:0> 0.upto(24).each { |i| p SearchStatistic.where(:year => 2015, :day => 26, :month => 10, :hour => i).count }
5
5
5
5
5
5
5
5
5
5
5
5
5
5
5
5
5
5
5
5
5
5
5
5
0
=> 0
irb(main):015:0> 0.upto(24).each { |i| p SearchStatistic.where(:year => 2015, :day => 27, :month => 10, :hour => i).count }
5
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
=> 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment