Lines Matching +full:directory +full:- +full:level
5 # This source code is licensed under both the BSD-style license (found in the
6 # LICENSE file in the root directory of this source tree) and the GPLv2 (found
7 # in the COPYING file in the root directory of this source tree).
8 # You may select, at your option, one of the above-listed licenses.
41 data = json.loads(urllib.request.urlopen(GITHUB_API_PR_URL).read().decode("utf-8"))
58 tmp = subprocess.run(["git", "log", "-1"], stdout=subprocess.PIPE).stdout.decode(
59 "utf-8"
64 ).stdout.decode("utf-8")
68 ).stdout.decode("utf-8")
86 rm -rf zstd-{user}-{sha} &&
87 git clone {github_url} zstd-{user}-{sha} &&
88 cd zstd-{user}-{sha} &&
90 make -j &&
101 return "zstd-{user}-{sha}/zstd".format(user=build["user"], sha=build["hash"])
103 os.system("cd ../ && make -j && cd tests")
109 return [float(output[idx[0] - 1]), float(output[idx[1] - 1])]
112 def benchmark_single(executable, level, filename): argument
115 … [executable, "-qb{}".format(level), filename], stdout=subprocess.PIPE, stderr=subprocess.STDOUT,
117 .stdout.decode("utf-8")
122 def benchmark_n(executable, level, filename, n): argument
123 speeds_arr = [benchmark_single(executable, level, filename) for _ in range(n)]
126 …"Bench (executable={} level={} filename={}, iterations={}):\n\t[cspeed: {} MB/s, dspeed: {} MB/s]"…
128 level,
145 def benchmark_dictionary_single(executable, filenames_directory, dictionary_filename, level, iterat… argument
148 …n([executable, "-qb{}".format(level), "-D", dictionary_filename, "-r", filenames_directory], stdou…
154 …"Bench (executable={} level={} filenames_directory={}, dictionary_filename={}, iterations={}):\n\t…
156 level,
173 cspeed_reg = (old_cspeed - new_cspeed) / old_cspeed
174 dspeed_reg = (old_dspeed - new_dspeed) / old_dspeed
188 for j, level in enumerate(levels):
197 … "[COMPRESSION REGRESSION] (level={} filename={})\n\t{} -> {}\n\t{} -> {} ({:0.2f}%)".format(
198 level,
209 … "[DECOMPRESSION REGRESSION] (level={} filename={})\n\t{} -> {}\n\t{} -> {} ({:0.2f}%)".format(
210 level,
225 for j, level in enumerate(levels):
233 …"[COMPRESSION REGRESSION] (level={} filenames_directory={} dictionary_filename={})\n\t{} -> {}\n\t…
234 level,
246 …"[DECOMPRESSION REGRESSION] (level={} filenames_directory={} dictionary_filename={})\n\t{} -> {}\n…
247 level,
278 echo "{}" | mutt -s "[zstd regression] caused by new pr" {}
293 …parser.add_argument("--directory", help="directory with files to benchmark", default="golden-compr…
294 parser.add_argument("--levels", help="levels to test e.g. ('1,2,3')", default="1")
295 parser.add_argument("--iterations", help="number of benchmark iterations to run", default="1")
296 …parser.add_argument("--emails", help="email addresses of people who will be alerted upon regressio…
297 …parser.add_argument("--frequency", help="specifies the number of seconds to wait before each succe…
298 …parser.add_argument("--mode", help="'fastmode', 'onetime', 'current', or 'continuous' (see README.…
299 …rgument("--dict", help="filename of dictionary to use (when set, this dictionary will be used to c…
302 filenames = args.directory