Carsten Senger committed a918143

Add a nullpython interpreter that can be used for baseline

It will not run any benchmarks, just tell that every run of the benchmark
too 0.0001 seconds. Make sure we don't upload this data to codespeed.

  • Participants
  • Parent commits d9e2730

Comments (0)

Files changed (2)


+'''This is a dummy that does nothing except that it returns 1
+second for every round of the benchmark.
+You can use this as the baseline interpreter if you are only
+interested in the time of the changed interpreter, but not
+in the difference to a baseline interpreter.
+from own import util
+import optparse
+if __name__ == '__main__':
+    parser = optparse.OptionParser(
+        usage="%prog [options]",
+        description="Test the performance of the Go benchmark")
+    util.add_standard_options_to(parser)
+    options, args = parser.parse_args()
+    main = lambda n: [0.0001 for x in range(options.num_runs)]
+    util.run_benchmark(options, options.num_runs, main)
     * 'urls (list of strings).
     * 'branch' (string)
     * 'revision' (string)
     This correspondents to the the --upload* and --upload-baseline*
                                      'have to specify a --revision (or '
                                      '--upload-baseline-revision if you '
                                      'want to upload the baseline result')
+            if ((run == BASELINE and '' in options.baseline) or
+                (run == CHANGED and '' in options.pypy_c)):
+                raise AssertionError("Don't upload data from the nullpython "
+                                     "dummy interpreter. It won't run any "
+                                     "real benchmarks.")
         upload_options[run] = {
             'upload': upload,
             'project': project,
         revision = upload_options[run]['revision']
         if upload:
+            # prevent to upload results from the nullpython dummy
             host = force_host if force_host else socket.gethostname()
             for url in urls:
                 print save(project, revision, results, executable, host, url,