| OLD | NEW |
| 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 import argparse | 5 import argparse |
| 6 import cProfile | 6 import cProfile |
| 7 import pstats | 7 import pstats |
| 8 import StringIO | 8 import StringIO |
| 9 import inspect | 9 import inspect |
| 10 import sys | 10 import sys |
| 11 import os | 11 import os |
| 12 | 12 |
| 13 import tracing_project | 13 import tracing_project |
| 14 from tvcm import generate | 14 from py_vulcanize import generate |
| 15 from tvcm import project | 15 from py_vulcanize import project |
| 16 | 16 |
| 17 | 17 |
| 18 class Bench(object): | 18 class Bench(object): |
| 19 | 19 |
| 20 def SetUp(self): | 20 def SetUp(self): |
| 21 pass | 21 pass |
| 22 | 22 |
| 23 def Run(self): | 23 def Run(self): |
| 24 pass | 24 pass |
| 25 | 25 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 ps = pstats.Stats(pr, stream=s).sort_stats(sortby) | 57 ps = pstats.Stats(pr, stream=s).sort_stats(sortby) |
| 58 ps.print_stats() | 58 ps.print_stats() |
| 59 print s.getvalue() | 59 print s.getvalue() |
| 60 return 0 | 60 return 0 |
| 61 finally: | 61 finally: |
| 62 bench.TearDown() | 62 bench.TearDown() |
| 63 | 63 |
| 64 | 64 |
| 65 if __name__ == '__main__': | 65 if __name__ == '__main__': |
| 66 sys.exit(Main(sys.argv[1:])) | 66 sys.exit(Main(sys.argv[1:])) |
| OLD | NEW |