   for entry in arr[0..30]
     avg = entry.self / entry.counts
     console.log "#{entry.total}\t#{entry.self}\t#{entry.counts}\t#{avg.toFixed 1}\t#{entry.name}"
+
+stub = (obj, name, replacement, wrapped) ->
+  old_fn = obj[name]
+  try
+    obj[name] = replacement
+    wrapped()
+  finally
+    obj[name] = old_fn
 
 extract_jar = (jar_path, main_class_name) ->
   AdmZip = require 'adm-zip'

    call_counts[method_name] ?= 0

    start = (new Date).getTime()
    old_fn.call this, arguments...
    end = (new Date).getTime()

    timings[hash] += end - start

  methods.Method::run_bytecode = profiled_fn(methods.Method::run_bytecode)
  methods.Method::run_manually = profiled_fn(methods.Method::run_manually)

  runner()

  self_timings = {}
  total_timings = {}
