2012-12-24 11:19:26.378 CAXElement[24751:1e03] Timer for Enumeration: 0.056977s (0.000183s each for count 312, 5475.847230/s)
2012-12-24 11:19:26.675 CAXElement[24751:4703] Results: 25
2012-12-24 11:19:26.675 CAXElement[24751:4703] Results Count: 25
2012-12-24 11:19:26.675 CAXElement[24751:4703] Timer for Search: 0.297275s (0.000953s each for count 312, 1049.532079/s)
2012-12-24 11:19:26.676 CAXElement[24751:4703] Timer for Enumeration and Search: 0.355207s (0.001138s each for count 312, 878.360562/s)
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
# Seeing really confusing RSpec output like this? | |
# Failure/Error: obj.will_paginated_array.map(&:id).should =~ [foo.id, bar.id] | |
# expected: [1, 2] | |
# got: [1, 2] (using =~) | |
# (WillPaginate::Collection#map returns WillPaginate::Collection instance) | |
# This is due to how OperatorMatcher simply does a lookup of the class of the actual | |
# result rather and checking a hash rather than using #is_a?(klass) | |
# | |
# This snippet below will make it work again. |
Try out the fast require patch from http://bugs.ruby-lang.org/issues/7158 on Ruby 1.9.3-p327
- rbenv
- ruby-build
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
index: | |
store: | |
type: mmapfs | |
fs: | |
mmapfs: | |
enabled: true |
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
You want to look at the top entries in the next two tables to reduce overall view rendering time. Cache or optimise. | |
{% line_chart regexp:'View/.*/Partial' title:'Total partial time' value:total_value %} | |
{% line_chart regexp:'View/.*/Rendering' title:'Total view render time' value:total_value %} | |
<hr /> | |
{% line_chart regexp:'View/.*/Partial' title:'Slowest Partial' value:average_response_time %} |
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
{% compare_with_yesterday_and_last_week_chart metric:'ActiveRecord/find' title:'ActiveRecord Find Response time' value:average_response_time %} | |
{% compare_with_yesterday_and_last_week_chart metric:'ActiveRecord/create' title:'ActiveRecord Create Response time' value:average_response_time %} | |
{% compare_with_yesterday_and_last_week_chart metric:'ActiveRecord/save' title:'ActiveRecord Save Response time' value:average_response_time %} | |
{% compare_with_yesterday_and_last_week_chart metric:'ActiveRecord/destroy' title:'ActiveRecord Destroy Response time' value:average_response_time %} | |
{% line_chart value:call_count regexp:'Database/SQL/.*' title:'SQL Throughput' %} |
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
class DocStrings | |
def docstrings! | |
""" | |
This is a docstring that's syntactically valid! | |
It'll do multiple lines! | |
""" | |
end | |
def single_line_docstring | |
"""Single line docstring!""" |
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
def is_prime?(number) | |
return false if number == 2 | |
return false if (number % 2).zero? | |
i = 3 | |
while i * i < number | |
return false if (number % i).zero? | |
i += 2 | |
end | |
true | |
end |
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 'benchmark' | |
C = 100 | |
Benchmark.bm do |x| | |
x.report do | |
C.times do | |
`pbpaste` | |
end | |
end | |
x.report do |
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
As of Jan 2011 | |
DownTownCafe: dcafe - shitty | |
Le Buffalo: cozy1 - alright | |
linksys (near Le Buffalo, same network): no pass - pretty good (17mbit synchronous) | |
nisekopizza: nisekopizza111 - meh | |
abucha: none - 7mbit synchronous | |
Nisade: nisadetama/2010 |