2 # Copyright 2014 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file.
9 from memory_inspector
.frontends
import www_server
12 DEFAULT_HTTP_PORT
= 8089
15 def _ParseArguments():
16 parser
= argparse
.ArgumentParser(description
='Start the memory inspector.')
20 default
=DEFAULT_HTTP_PORT
,
21 help='the port on which the memory inspector server will run')
26 help=('start the memory inspector server without launching the web-based '
28 return parser
.parse_args()
31 if __name__
== '__main__':
32 options
= _ParseArguments()
33 logging
.getLogger().setLevel(logging
.WARNING
)
34 print 'Serving on port %d' % options
.port
35 if not options
.no_browser
:
37 webbrowser
.open('http://127.0.0.1:%d' % options
.port
)
38 www_server
.Start(options
.port
)