def run_talos(prof, name): t = Talos(profile=prof, firefox=firefox, talos_dir='talos') results = [] for i in range(0, cycles): time.sleep(20) results.append(t.run_ts(cycles=1)[0]) rawWriter.writerow([name] + results) raw_file.flush() average = int(round(reduce(lambda x, y: int(x)+int(y), results) / cycles)) resultsWriter.writerow([name, average]) results_file.flush()
def test_addon_perf(): firefox = FirefoxRunner(binary='firefox/firefox') profile = Profile() profile.initialize(runner=firefox) t = Talos(profile=profile, firefox=firefox, talos_dir='talos') results = [] cycles = 10 for i in range(0, cycles): #time.sleep(10) results.append(t.run_ts(cycles=1)[0]) print results