OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 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 import logging | 6 import logging |
7 import os | 7 import os |
8 import tempfile | 8 import tempfile |
9 | 9 |
10 import devtools_test_base | 10 import devtools_test_base |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 | 58 |
59 def PrintTestResult(self, hostname, snapshot): | 59 def PrintTestResult(self, hostname, snapshot): |
60 total = snapshot.GetProcessPrivateMemorySize() | 60 total = snapshot.GetProcessPrivateMemorySize() |
61 counted_objects = snapshot.GetInstrumentedObjectsCount() | 61 counted_objects = snapshot.GetInstrumentedObjectsCount() |
62 counted_unknown_objects = snapshot.GetNumberOfInstrumentedObjectsNotInHeap() | 62 counted_unknown_objects = snapshot.GetNumberOfInstrumentedObjectsNotInHeap() |
63 if not counted_objects or not counted_unknown_objects: | 63 if not counted_objects or not counted_unknown_objects: |
64 logging.info('No information about number of instrumented objects.') | 64 logging.info('No information about number of instrumented objects.') |
65 return | 65 return |
66 logging.info('Got data for: %s, objects count = %d (unknown = %d) ' % | 66 logging.info('Got data for: %s, objects count = %d (unknown = %d) ' % |
67 (hostname, counted_objects, counted_unknown_objects)) | 67 (hostname, counted_objects, counted_unknown_objects)) |
68 graph_name = 'DevTools Instrumented Objects - ' + hostname | 68 pyauto_utils.PrintPerfResult('DevTools Unknown Instrumented Objects', |
69 pyauto_utils.PrintPerfResult(graph_name, 'Reported instrumented objects', | 69 hostname, counted_unknown_objects, 'objects') |
70 counted_objects, 'objects') | |
71 pyauto_utils.PrintPerfResult(graph_name, 'Not allocated by tcmalloc', | |
72 counted_unknown_objects, 'objects') | |
73 | 70 |
74 | 71 |
75 if __name__ == '__main__': | 72 if __name__ == '__main__': |
76 pyauto_functional.Main() | 73 pyauto_functional.Main() |
OLD | NEW |