https://github.com/mupq/pqm4
Tip revision: 605bdf68df0f239ac2c74b752cc65b3e3bbe4275 authored by dependabot[bot] on 01 November 2024, 13:22:26 UTC
Bump libopencm3 from `1f3abd4` to `201f5bc`
Bump libopencm3 from `1f3abd4` to `201f5bc`
Tip revision: 605bdf6
benchmarks.py
#!/usr/bin/env python3
# SPDX-License-Identifier: Apache-2.0 or CC0-1.0
from mupq import mupq
from interface import parse_arguments, get_platform
import sys
if __name__ == "__main__":
args, rest = parse_arguments()
platform, settings = get_platform(args)
with platform:
schemes = [s for s in rest if s not in ['--nostack',
'--nospeed',
'--nohashing',
'--nosize']]
if "--nostack" not in rest:
test = mupq.StackBenchmark(settings, platform)
if test.test_all(schemes):
sys.exit(1)
if "--nospeed" not in rest:
test = mupq.SpeedBenchmark(settings, platform)
if test.test_all(schemes):
sys.exit(1)
if "--nohashing" not in rest:
test = mupq.HashingBenchmark(settings, platform)
if test.test_all(schemes):
sys.exit(1)
if "--nosize" not in rest:
test = mupq.SizeBenchmark(settings, platform)
if test.test_all(schemes):
sys.exit(1)