| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/env python |
| 2 | |
| 3 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 4 # 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 |
| 5 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 6 | 5 |
| 7 """Performance snapshot utility for pyauto tests. | 6 """Performance snapshot utility for pyauto tests. |
| 8 | 7 |
| 9 Wrapper around Chrome DevTools (mimics the front-end) to collect profiling info | 8 Wrapper around Chrome DevTools (mimics the front-end) to collect profiling info |
| 10 associated with a Chrome tab. This script collects snapshots of the v8 | 9 associated with a Chrome tab. This script collects snapshots of the v8 |
| 11 (Javascript engine) heap associated with the Chrome tab. | 10 (Javascript engine) heap associated with the Chrome tab. |
| 12 | 11 |
| (...skipping 850 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 863 snapshotter = PerformanceSnapshotter( | 862 snapshotter = PerformanceSnapshotter( |
| 864 tab_index=options.tab_index, output_file=options.output_file, | 863 tab_index=options.tab_index, output_file=options.output_file, |
| 865 interval=options.interval, num_snapshots=options.num_snapshots, | 864 interval=options.interval, num_snapshots=options.num_snapshots, |
| 866 verbose=options.verbose, | 865 verbose=options.verbose, |
| 867 show_socket_messages=options.show_socket_messages) | 866 show_socket_messages=options.show_socket_messages) |
| 868 | 867 |
| 869 if options.interactive_mode: | 868 if options.interactive_mode: |
| 870 snapshotter.SetInteractiveMode() | 869 snapshotter.SetInteractiveMode() |
| 871 | 870 |
| 872 snapshotter.HeapSnapshot() | 871 snapshotter.HeapSnapshot() |
| 872 return 0 |
| 873 | 873 |
| 874 | 874 |
| 875 if __name__ == '__main__': | 875 if __name__ == '__main__': |
| 876 main() | 876 sys.exit(main()) |
| OLD | NEW |