Sha256: 036b7c821b3f46184d4d00b6e482d1edaa1be73069abb236bbecb2f73c982689
Contents?: true
Size: 802 Bytes
Versions: 1
Compression:
Stored size: 802 Bytes
Contents
#!/usr/bin/env ruby require 'optparse' require 'stackprof-webnav' require 'rack' options = { :addr => "127.0.0.1", :port => 9292 } parser = OptionParser.new(ARGV) do |o| o.banner = "Usage: stackprof-webnav [-f localfile.dump]|[-d directory]|[-o ADDR]|[-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('-o [ADDR]', 'Server addr bind') {|addr| options[:addr] = addr } 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, :Host => options[:addr], :Port => options[:port]
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
stackprof-webnav-1.0.1 | bin/stackprof-webnav |