Sha256: b6f7291065e483920898d3455be548a0308107c39829d233b7aabf2a08660654

Contents?: true

Size: 671 Bytes

Versions: 1

Compression:

Stored size: 671 Bytes

Contents

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

options = {
  :port => 9292
}

parser = OptionParser.new(ARGV) do |o|
  o.banner = "Usage: stackprof-webnav [-f localfile.dump]|[-d directory]|[-p NUMBER]"
  o.on('-f [LOCALFILE]', 'Local file path to dump') {|filepath| options[:filepath] = filepath }
  o.on('-d [DIRECTORY]', 'path to a directory with dumps') {|directory| options[:directory] = directory}
  o.on('-p [PORT]', 'Server port') {|port| options[:port] = port }
end

parser.parse!

server = StackProf::Webnav::Server
server.cmd_options = options

Rack::Handler.pick(['thin', 'webrick']).run server.new, :Port => options[:port]

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
stackprof-webnav-1.0.0 bin/stackprof-webnav