Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1017)

Side by Side Diff: tools/run_perf.py

Issue 1075143002: Add perf test configuration to track memory use of context and isolate. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: CamelCase names and addressed comment Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « test/memory/Memory.json ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright 2014 the V8 project authors. All rights reserved. 2 # Copyright 2014 the V8 project 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 """ 6 """
7 Performance runner for d8. 7 Performance runner for d8.
8 8
9 Call e.g. with tools/run-perf.py --arch ia32 some_suite.json 9 Call e.g. with tools/run-perf.py --arch ia32 some_suite.json
10 10
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 trace_result.traces[0]["stddev"] = stddev 404 trace_result.traces[0]["stddev"] = stddev
405 405
406 return reduce(lambda r, t: r + t, traces.itervalues(), Results()) 406 return reduce(lambda r, t: r + t, traces.itervalues(), Results())
407 407
408 408
409 def MakeGraph(suite, arch, parent): 409 def MakeGraph(suite, arch, parent):
410 """Factory method for making graph objects.""" 410 """Factory method for making graph objects."""
411 if isinstance(parent, Runnable): 411 if isinstance(parent, Runnable):
412 # Below a runnable can only be traces. 412 # Below a runnable can only be traces.
413 return Trace(suite, parent, arch) 413 return Trace(suite, parent, arch)
414 elif suite.get("main"): 414 elif suite.get("main") is not None:
415 # A main file makes this graph runnable. 415 # A main file makes this graph runnable. Empty strings are accepted.
416 if suite.get("tests"): 416 if suite.get("tests"):
417 # This graph has subgraphs (traces). 417 # This graph has subgraphs (traces).
418 return Runnable(suite, parent, arch) 418 return Runnable(suite, parent, arch)
419 else: 419 else:
420 # This graph has no subgraphs, it's a leaf. 420 # This graph has no subgraphs, it's a leaf.
421 return RunnableTrace(suite, parent, arch) 421 return RunnableTrace(suite, parent, arch)
422 elif suite.get("generic"): 422 elif suite.get("generic"):
423 # This is a generic suite definition. It is either a runnable executable 423 # This is a generic suite definition. It is either a runnable executable
424 # or has a main js file. 424 # or has a main js file.
425 return RunnableGeneric(suite, parent, arch) 425 return RunnableGeneric(suite, parent, arch)
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
711 711
712 if options.json_test_results: 712 if options.json_test_results:
713 results.WriteToFile(options.json_test_results) 713 results.WriteToFile(options.json_test_results)
714 else: # pragma: no cover 714 else: # pragma: no cover
715 print results 715 print results
716 716
717 return min(1, len(results.errors)) 717 return min(1, len(results.errors))
718 718
719 if __name__ == "__main__": # pragma: no cover 719 if __name__ == "__main__": # pragma: no cover
720 sys.exit(Main(sys.argv[1:])) 720 sys.exit(Main(sys.argv[1:]))
OLDNEW
« no previous file with comments | « test/memory/Memory.json ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698