1a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)#!/usr/bin/env python
2a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)# Copyright 2014 The Chromium Authors. All rights reserved.
3a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)# Use of this source code is governed by a BSD-style license that can be
4a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)# found in the LICENSE file.
5a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)
6cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)import logging
7a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)import webbrowser
8a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)
9a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)from memory_inspector.frontends import www_server
10a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)
11a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)
12a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)if __name__ == '__main__':
13a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)  HTTP_PORT=8089
14cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)  logging.getLogger().setLevel(logging.WARNING)
15a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)  print 'Serving on port %d' % HTTP_PORT
16a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)  webbrowser.open('http://localhost:%d' % HTTP_PORT)
17a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)  www_server.Start(HTTP_PORT)