OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 from skypy.skyserver import SkyServer | 6 from skypy.skyserver import SkyServer |
7 import argparse | 7 import argparse |
8 import json | 8 import json |
9 import logging | 9 import logging |
10 import os | 10 import os |
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
380 gdb_attach_parser = subparsers.add_parser('gdb_attach', | 380 gdb_attach_parser = subparsers.add_parser('gdb_attach', |
381 help='launch gdb and attach to gdbserver launched from start --gdb') | 381 help='launch gdb and attach to gdbserver launched from start --gdb') |
382 gdb_attach_parser.set_defaults(func=self.gdb_attach_command) | 382 gdb_attach_parser.set_defaults(func=self.gdb_attach_command) |
383 | 383 |
384 self._add_basic_command(subparsers, 'trace', '/trace', | 384 self._add_basic_command(subparsers, 'trace', '/trace', |
385 'toggle tracing') | 385 'toggle tracing') |
386 self._add_basic_command(subparsers, 'reload', '/reload', | 386 self._add_basic_command(subparsers, 'reload', '/reload', |
387 'reload the current page') | 387 'reload the current page') |
388 self._add_basic_command(subparsers, 'inspect', '/inspect', | 388 self._add_basic_command(subparsers, 'inspect', '/inspect', |
389 'stop the running sky instance') | 389 'stop the running sky instance') |
| 390 self._add_basic_command(subparsers, 'start_profiling', '/start_profiling
', |
| 391 'starts profiling the running sky instance (Linux only)') |
| 392 self._add_basic_command(subparsers, 'stop_profiling', '/stop_profiling', |
| 393 'stios profiling the running sky instance (Linux only)') |
390 | 394 |
391 load_parser = subparsers.add_parser('load', | 395 load_parser = subparsers.add_parser('load', |
392 help='load a new page in the currently running sky') | 396 help='load a new page in the currently running sky') |
393 load_parser.add_argument('url_or_path', type=str) | 397 load_parser.add_argument('url_or_path', type=str) |
394 load_parser.set_defaults(func=self.load_command) | 398 load_parser.set_defaults(func=self.load_command) |
395 | 399 |
396 args = parser.parse_args() | 400 args = parser.parse_args() |
397 args.func(args) | 401 args.func(args) |
398 | 402 |
399 self._write_pid_file(PID_FILE_PATH, self.pids) | 403 self._write_pid_file(PID_FILE_PATH, self.pids) |
400 | 404 |
401 | 405 |
402 if __name__ == '__main__': | 406 if __name__ == '__main__': |
403 SkyDebugger().main() | 407 SkyDebugger().main() |
OLD | NEW |