Release Kaleido 0.1.10 with native Original playback and PCM compatibility
All checks were successful
Validate and publish Kaleido / android (push) Successful in 2m45s
All checks were successful
Validate and publish Kaleido / android (push) Successful in 2m45s
This commit is contained in:
parent
784921dba9
commit
2a83fe0db5
23 changed files with 721 additions and 43 deletions
28
scripts/benchmark_release.py
Normal file
28
scripts/benchmark_release.py
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
"""Compare optimized release builds on one authorized device at a time."""
|
||||
import argparse,json,pathlib,re,statistics,subprocess,sys,time
|
||||
from device import adb,DEVICE,OUT
|
||||
from verify_ui import wait,labels,focus
|
||||
|
||||
def main():
|
||||
p=argparse.ArgumentParser();p.add_argument('label');p.add_argument('--cycles',type=int,default=3);p.add_argument('--nav-cycles',type=int,default=1)
|
||||
args=p.parse_args();folder=OUT/'release-comparison';folder.mkdir(exist_ok=True)
|
||||
package=adb('shell','dumpsys','package','tv.kaleido.app').decode()
|
||||
assert 'DEBUGGABLE' not in re.search(r'pkgFlags=\[(.*?)\]',package)[1],'Performance tests require a release APK'
|
||||
assert 'status=speed-profile' in package,'Apply the matching ART profile before comparison'
|
||||
result={'device':DEVICE,'version':re.search(r'versionName=(\S+)',package)[1],'startup':[]}
|
||||
adb('shell','input','keyevent','KEYCODE_WAKEUP')
|
||||
for i in range(args.cycles):
|
||||
adb('shell','am','force-stop','tv.kaleido.app');start=time.monotonic()
|
||||
raw=adb('shell','am','start','-W','-n','tv.kaleido.app/.MainActivity').decode()
|
||||
wait(lambda r:'Continue Watching' in labels(r) and focus(r)=='Home' and
|
||||
all(n.get('content-desc')!='Kaleido starting' for n in r.iter('node')),'Cold Home ready',timeout=45)
|
||||
row={'homeReadySeconds':round(time.monotonic()-start,3)}
|
||||
row.update({k:int(v) for k,v in re.findall(r'(ThisTime|TotalTime|WaitTime): (\d+)',raw)})
|
||||
result['startup'].append(row);print('STARTUP',args.label,i+1,row,flush=True)
|
||||
result['medianHomeReadySeconds']=statistics.median(r['homeReadySeconds'] for r in result['startup'])
|
||||
result['medianActivityMs']=statistics.median(r['TotalTime'] for r in result['startup'])
|
||||
(folder/(args.label+'.json')).write_text(json.dumps(result,indent=2))
|
||||
nav=subprocess.run([sys.executable,str(pathlib.Path(__file__).with_name('profile_transitions.py')),args.label,'--cycles',str(args.nav_cycles)])
|
||||
if nav.returncode:raise SystemExit(nav.returncode)
|
||||
print('COMPLETE',args.label,'activity median',result['medianActivityMs'],'Home median',result['medianHomeReadySeconds'],flush=True)
|
||||
if __name__=='__main__':main()
|
||||
Loading…
Add table
Add a link
Reference in a new issue