<s> import os <EOL> import re <EOL> import time <EOL> from wlauto import AndroidUiAutoBenchmark <EOL> class Smartbench ( AndroidUiAutoBenchmark ) : <EOL> name = '<STR_LIT>' <EOL> description = """<STR_LIT>""" <EOL> package = '<STR_LIT>' <EOL> activity = '<STR_LIT>' <EOL> summary_metrics = [ '<STR_LIT>' , '<STR_LIT>' ] <EOL> run_timeout = <NUM_LIT:10> * <NUM_LIT> <EOL> prod_regex = re . compile ( '<STR_LIT>' ) <EOL> game_regex = re . compile ( '<STR_LIT>' ) <EOL> def update_result ( self , context ) : <EOL> super ( Smartbench , self ) . update_result ( context ) <EOL> with open ( self . logcat_log ) as fh : <EOL> text = fh . read ( ) <EOL> match = self . prod_regex . search ( text ) <EOL> prod = int ( match . group ( <NUM_LIT:1> ) ) <EOL> match = self . game_regex . search ( text ) <EOL> game = int ( match . group ( <NUM_LIT:1> ) ) <EOL> context . result . add_metric ( '<STR_LIT>' , prod ) <EOL> context . result . add_metric ( '<STR_LIT>' , game ) </s>
