Sha256: 51e6d1e1d125a0dfd9dcca885e4a1291ad1a382f4b10999ccce4376a5565c1c3

Contents?: true

Size: 322 Bytes

Versions: 1

Compression:

Stored size: 322 Bytes

Contents

#!/usr/bin/env ruby

cmd = ARGV.shift

path = `which #{cmd}`.chomp

$PROGRAM_NAME = cmd

mode = ENV['STACKPROF_MODE']&.to_sym || :cpu
out = ENV['STACKPROF_OUT'] || 'stackprof-out'

require 'stackprof'
ex = nil
StackProf.run(mode: mode, out: out) do
  begin
    load path
  rescue Exception => ex
  end
end

raise ex if ex

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
stackprof-run-0.2.0 exe/stackprof-run