This file contains 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
labelTypeName | labelSheetWidth | labelSheetHeight | topMargin | bottomMargin | leftMargin | rightMargin | numberOfRows | numberOfColumns | horizontalGutter | verticalGutter | |
---|---|---|---|---|---|---|---|---|---|---|---|
Avery 2160 Bottom | 8.5 | 11 | 5.5 | 0.5 | 0.81 | 0.81 | 4 | 1 | 0 | 0 | |
Avery 2160 Top | 8.5 | 11 | 0.5 | 5.5 | 0.81 | 0.81 | 4 | 1 | 0 | 0 | |
Avery 2162 Bottom | 8.5 | 11 | 5.5 | 0.5 | 0.125 | 0.125 | 3 | 1 | 0 | 0 | |
Avery 2162 Top | 8.5 | 11 | 0.5 | 5.5 | 0.125 | 0.125 | 3 | 1 | 0 | 0 | |
Avery 2163 Bottom | 8.5 | 11 | 5.5 | 0.5 | 0.125 | 0.125 | 2 | 1 | 0 | 0 | |
Avery 2163 Top | 8.5 | 11 | 0.5 | 5.5 | 0.125 | 0.125 | 2 | 1 | 0 | 0 | |
Avery 2164 Bottom | 8.5 | 11 | 5.844 | 0.844 | 0.125 | 0.125 | 1 | 1 | 0 | 0 | |
Avery 2164 Top | 8.5 | 11 | 0.844 | 5.844 | 0.125 | 0.125 | 1 | 1 | 0 | 0 | |
Avery 5159 | 8.5 | 11 | 0.25 | 0.25 | 0.156 | 0.156 | 7 | 2 | 0.188 | 0 |
This file contains 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/ips' | |
require 'redis' | |
class MethodProfiler | |
def self.patch(klass, methods, name) | |
patches = methods.map do |method_name| | |
<<~RUBY | |
unless defined?(#{method_name}__mp_unpatched) | |
alias_method :#{method_name}__mp_unpatched, :#{method_name} | |
def #{method_name}(*args, &blk) | |
unless prof = Thread.current[:_method_profiler] |