Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Classes | Functions | Variables
tools.skpbench.skiaperf Namespace Reference

Classes

class  JSONDict
 

Functions

 main ()
 

Variables

 nargs
 
 help
 
 default
 
 FLAGS = __argparse.parse_args()
 

Function Documentation

◆ main()

tools.skpbench.skiaperf.main ( )

Definition at line 65 of file skiaperf.py.

65def main():
66 data = JSONDict(
67 FLAGS.properties + \
68 ['key', JSONDict(FLAGS.key + \
69 ['bench_type', 'playback', \
70 'source_type', 'skp'])])
71
72 for src in FLAGS.sources:
73 with open(src, mode='r') as infile:
74 for line in infile:
75 match = BenchResult.match(line)
76 if not match:
77 continue
78 if match.sample_ms != 50:
79 raise Exception("%s: unexpected sample_ms != 50" % match.sample_ms)
80 for result in ('accum', 'median', 'min', 'max'):
81 data['results'][match.bench][match.config] \
82 ['%s_%s_%s' % (result, match.clock, match.metric)] = \
83 getattr(match, result)
84
85 if FLAGS.outfile != '-':
86 with open(FLAGS.outfile, 'w+') as outfile:
87 data.emit(outfile)
88 else:
89 data.emit(sys.stdout)
90
Definition main.py:1

Variable Documentation

◆ default

tools.skpbench.skiaperf.default

Definition at line 28 of file skiaperf.py.

◆ FLAGS

tools.skpbench.skiaperf.FLAGS = __argparse.parse_args()

Definition at line 30 of file skiaperf.py.

◆ help

tools.skpbench.skiaperf.help

Definition at line 22 of file skiaperf.py.

◆ nargs

tools.skpbench.skiaperf.nargs

Definition at line 22 of file skiaperf.py.