mirror of
https://github.com/LTTLabsOSS/markbench-tests.git
synced 2026-01-09 22:18:00 -05:00
everyone loves a linter
This commit is contained in:
@@ -128,8 +128,6 @@ try:
|
||||
logging.info("Benchmark took %.2f seconds", elapsed_test_time)
|
||||
logging.info("Score was %s", score)
|
||||
|
||||
|
||||
|
||||
report = {
|
||||
"test": BENCHMARK_CONFIG[args.benchmark]["test_name"],
|
||||
"unit": "score",
|
||||
|
||||
@@ -6,7 +6,7 @@ import subprocess
|
||||
import sys
|
||||
import time
|
||||
import psutil
|
||||
from cinebench_utils import friendlyTestName, get_score
|
||||
from cinebench_utils import friendly_test_name, get_score
|
||||
|
||||
PARENT_DIR = str(Path(sys.path[0], ".."))
|
||||
sys.path.append(PARENT_DIR)
|
||||
@@ -90,7 +90,7 @@ try:
|
||||
logging.info("Benchmark took %.2f seconds", elapsed_test_time)
|
||||
|
||||
report = {
|
||||
"test": friendlyTestName(test_type),
|
||||
"test": friendly_test_name(test_type),
|
||||
"score": score,
|
||||
"unit": "score",
|
||||
"start_time": seconds_to_milliseconds(start_time),
|
||||
|
||||
@@ -13,11 +13,13 @@ def get_score(output: str) -> str | None:
|
||||
return None
|
||||
|
||||
|
||||
def friendlyTestName(test: str) -> str:
|
||||
def friendly_test_name(test: str) -> str:
|
||||
"""Return a friendlier string given a test argument"""
|
||||
if test == "g_CinebenchCpu1Test=true":
|
||||
return "Cinebench 2024 Single Core"
|
||||
if test == "g_CinebenchCpuXTest=true":
|
||||
return "Cinebench 2024 Multicore"
|
||||
if test == "g_CinebenchGpuTest=true":
|
||||
if test == "g_CinebenchGpuTest=true":
|
||||
return "Cinebench 2024 GPU"
|
||||
return test
|
||||
|
||||
@@ -4,7 +4,7 @@ import getpass
|
||||
import subprocess
|
||||
import sys
|
||||
from pathlib import Path
|
||||
from gravitymark_utils import friendlyTestName, get_args, get_score, create_gravitymark_command
|
||||
from gravitymark_utils import friendly_test_name, get_args, get_score, create_gravitymark_command
|
||||
|
||||
PARENT_DIR = str(Path(sys.path[0], ".."))
|
||||
sys.path.append(PARENT_DIR)
|
||||
@@ -57,7 +57,7 @@ try:
|
||||
sys.exit(1)
|
||||
|
||||
report = {
|
||||
"test": friendlyTestName(args.api),
|
||||
"test": friendly_test_name(args.api),
|
||||
"score": score,
|
||||
"unit": "score"
|
||||
}
|
||||
|
||||
@@ -23,7 +23,8 @@ CLI_OPTIONS = {
|
||||
"-status": "1"
|
||||
}
|
||||
|
||||
def friendlyTestName(api: str) -> str:
|
||||
def friendly_test_name(api: str) -> str:
|
||||
"""return a friendlier string given the API harness argument"""
|
||||
if api == "vulkan":
|
||||
return "GravityMark Vulkan"
|
||||
if api == "opengl":
|
||||
@@ -32,6 +33,7 @@ def friendlyTestName(api: str) -> str:
|
||||
return "GravityMark DX12"
|
||||
if api == "direct3d11":
|
||||
return "GravityMark DX11"
|
||||
return api
|
||||
|
||||
def get_args() -> Namespace:
|
||||
"""Get command line arguments for test script"""
|
||||
|
||||
Reference in New Issue
Block a user