Lines Matching defs:args
34 args = None
52 stdout_lines, stderr_lines = popen.communicate(timeout=args.timeout)
89 def send_email_with_attachments(branch, commit, last_commit, args, text, results_files,
96 args.lowerLimit, args.ratioLimit)
98 execute('mutt -s "' + email_topic + '" ' + args.emails + ' -a ' + results_files
101 execute('mail -s "' + email_topic + '" ' + args.emails + ' < ' + logFileName)
147 def benchmark_and_compare(branch, commit, last_commit, args, executableName, md5sum, compilerVersion, resultsFileName,
150 while os.getloadavg()[0] > args.maxLoadAvg:
152 % (os.getloadavg()[0], args.maxLoadAvg, sleepTime))
155 result = execute('programs/%s -rqi5b1e%s %s' % (executableName, args.lastCLevel, testFilePath), print_output=True)
157 linesExpected = args.lastCLevel + 1
171 if (cspeed[i]/last_cspeed[i] < args.lowerLimit):
173 if (dspeed[i]/last_dspeed[i] < args.lowerLimit):
175 if (float(last_csize[i])/csize[i] < args.ratioLimit):
178 text = args.message + ("\nmaxLoadAvg=%s load average at start=%s end=%s\n%s last_commit=%s md5=%s\n" % (args.maxLoadAvg, start_load, end_load, compilerVersion, last_commit, md5sum)) + text
193 def double_check(branch, commit, args, executableName, md5sum, compilerVersion, resultsFileName, filePath, fileName):
195 if not args.dry_run:
196 text = benchmark_and_compare(branch, commit, last_commit, args, executableName, md5sum, compilerVersion, resultsFileName, filePath, fileName, csize, cspeed, dspeed)
199 text = benchmark_and_compare(branch, commit, last_commit, args, executableName, md5sum, compilerVersion, resultsFileName, filePath, fileName, csize, cspeed, dspeed)
203 def test_commit(branch, commit, last_commit, args, testFilePaths, have_mutt, have_mail):
206 if not args.dry_run:
223 text = double_check(branch, commit, args, 'lz4', md5_lz4, 'gcc_version='+gcc_version, resultsFileName, filePath, fileName)
228 text = double_check(branch, commit, args, 'lz4c32', md5_lz4c32, 'gcc_version='+gcc_version, resultsFileName, filePath, fileName)
233 text = double_check(branch, commit, args, 'lz4_clang', md5_lz4_clang, 'clang_version='+clang_version, resultsFileName, filePath, fileName)
238 send_email_with_attachments(branch, commit, last_commit, args, text_to_send, results_files, logFileName, have_mutt, have_mail)
255 args = parser.parse_args()
256 verbose = args.verbose
259 testFileNames = args.testFileNames.split()
280 print("PARAMETERS:\nrepoURL=%s" % args.repoURL)
284 print("message=%s" % args.message)
285 print("emails=%s" % args.emails)
286 print("maxLoadAvg=%s" % args.maxLoadAvg)
287 print("lowerLimit=%s" % args.lowerLimit)
288 print("ratioLimit=%s" % args.ratioLimit)
289 print("lastCLevel=%s" % args.lastCLevel)
290 print("sleepTime=%s" % args.sleepTime)
291 print("timeout=%s" % args.timeout)
292 print("dry_run=%s" % args.dry_run)
293 print("verbose=%s" % args.verbose)
301 execute('git clone ' + args.repoURL)
313 send_email(args.emails, '[%s:%s] test-lz4-speed.py %s has been started' % (email_header, pid, script_version), args.message, have_mutt, have_mail)
326 log("sleep for %s seconds" % args.sleepTime)
327 time.sleep(args.sleepTime)
329 if (loadavg <= args.maxLoadAvg):
340 test_commit(branch, commit, last_commit, args, testFilePaths, have_mutt, have_mail)
342 log("WARNING: main loadavg=%.2f is higher than %s" % (loadavg, args.maxLoadAvg))
346 send_email(args.emails, email_topic, stack, have_mutt, have_mail)
350 send_email(args.emails, '[%s:%s] test-lz4-speed.py %s has been stopped' % (email_header, pid, script_version), args.message, have_mutt, have_mail)