Sha256: ca35a11a2c3b931e336e39c411d5e5d55bbac108c05b4e9ce5038f446dd255b4

Contents?: true

Size: 545 Bytes

Versions: 1

Compression:

Stored size: 545 Bytes

Contents

#!/usr/bin/env ruby
require 'optparse'
require 'stackprof-webnav'

options = {
  :port => 9292
}

parser = OptionParser.new(ARGV) do |o|
  o.banner = "Usage: stackprof-webnav file.dump|http://path/to/file.dump [-p NUMBER]"
  o.on('-p [PORT]', 'Server port') {|port| options[:port] = port }
end

parser.parse!
parser.abort(parser.help) if ARGV.empty?

file = ARGV.pop
server = StackProf::Webnav::Server

if File.exists?(file)
  server.report_dump_path = File.expand_path(file)
else
  server.report_dump_url = file
end

server.run! options[:port]

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
stackprof-webnav-0.0.2 bin/stackprof-webnav