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
=begin | |
Decoding a large proto 1,000 times. | |
Ruby 2.2.3 | |
user system total real | |
protobuf encoding 13.060000 0.180000 13.240000 ( 13.262584) | |
google-protobuf encoding 1.780000 0.050000 1.830000 ( 1.823272) | |
protobuf decoding 8.890000 0.030000 8.920000 ( 8.927971) |
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' | |
require 'beefcake' # 1.1.0 | |
require 'protocol_buffers' # 1.6.1 | |
require 'protobuf' # 3.5.5 | |
require 'protobuf/message' | |
require 'google/protobuf' # 3.0.0.alpha.4.0 | |
require 'varint/varint' # 0.1.1 | |
module Test | |
# beefcake |
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' | |
require 'protobuf' | |
require 'varint/varint' | |
ITERATIONS = 1_000_000 | |
class Test | |
extend ::Varint | |
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
DependencyDetection.defer do | |
@name = :mongodb | |
depends_on do | |
defined?(::Mongo) and not NewRelic::Control.instance['disable_mongodb'] | |
end | |
executes do | |
NewRelic::Agent.logger.debug 'Installing MongoDB instrumentation' | |
end |
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
ec2: | |
default: | |
- | |
group: monitor | |
region: us-west-1 | |
port: 4949 | |
protocol: tcp | |
note: M/Monit | |
- | |
group: monitor |
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
class Person | |
include Mongoid::Document | |
field :name, :type => String | |
embeds_one :location | |
end | |
class Location | |
include Mongoid::Document | |
field :country, :type => String, :default => "US" | |
field :address, :type => String |
NewerOlder