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' | |
require 'rubygems' | |
require 'gruff' | |
require 'httparty' | |
require 'json' | |
class LoggedRequest | |
attr_reader :response_time, :path, :status | |
def initialize(request) |
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 MemoryProfiler | |
# profile is a CLEAN, totally minimal memory profiler: | |
# | |
# * 1 thread | |
# * 2 hashes (curr, prev) | |
# * classes as keys | |
# * fixnums as values. | |
# | |
# No extra memory required if I can help it. Keep it as simple as |