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 'msgpack' | |
msg = MessagePack::pack("a" * 1024) | |
while true do | |
MessagePack::unpack(msg) | |
GC.start | |
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
def emit(tag, es, chain) | |
t = if @sample_unit == :all | |
'all' | |
else | |
tag | |
end | |
# Access to @counts SHOULD be protected by mutex, with a heavy penalty. | |
# Code below is not thread safe, but @counts (counter for sampling rate) is not | |
# so serious value (and probably will not be broke...), | |
# then i let here as it is now. |