From 55ddaa43152ec1ad837c93ddd13761f4c84cb301 Mon Sep 17 00:00:00 2001 From: derek-hirotsu <132305781+derek-hirotsu@users.noreply.github.com> Date: Tue, 5 Nov 2024 12:50:21 -0800 Subject: [PATCH] Correct naming for MSI Kombustor and PugetBench (#95) --- CHANGELOG.md | 4 ++ README.md | 28 ++++---- cspell.json | 3 +- msikombuster/msikombuster.py | 59 ---------------- {msikombuster => msikombustor}/README.md | 0 {msikombuster => msikombustor}/manifest.yaml | 4 +- .../msi_kombustor.png | Bin .../msi_kombustor_utils.py | 0 msikombustor/msikombustor.py | 65 ++++++++++++++++++ pugetbench/pugetbench.py | 2 +- pugetbench/utils.py | 2 +- 11 files changed, 88 insertions(+), 79 deletions(-) delete mode 100644 msikombuster/msikombuster.py rename {msikombuster => msikombustor}/README.md (100%) rename {msikombuster => msikombustor}/manifest.yaml (93%) rename {msikombuster => msikombustor}/msi_kombustor.png (100%) rename {msikombuster => msikombustor}/msi_kombustor_utils.py (100%) create mode 100644 msikombustor/msikombustor.py diff --git a/CHANGELOG.md b/CHANGELOG.md index fff9d21..0de2e56 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file. Changes are grouped by the date they are merged to the main branch of the repository and are ordered from newest to oldest. Dates use the ISO 8601 extended calendar date format, i.e. YYYY-MM-DD. +## 2024-11-05 + +- Correct typos in MSI Kombustor and PugetBench harnesses. + ## 2024-10-25 - Update test name in y-cruncher harness to not be the tuning used. diff --git a/README.md b/README.md index 9fe17ef..8cde278 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ We recommend you install python from the [official downloads page](https://www.p #### Poetry -This project uses [Poetry](https://python-poetry.org/docs/) for dependency management. +This project uses [Poetry](https://python-poetry.org/docs/) for dependency management. ##### Installation @@ -62,10 +62,10 @@ Once you've successfully installed Python and Poetry, it's time to kick off our Let's take a look at the folder structure -- msikombuster (dir) +- msikombustor (dir) - run (dir) - manifest.yaml - - msikombuster.py + - msikombustor.py - README.md When we mention "test harness," we are specifically referring to the entire directory and its contents. Within this directory, we anticipate, at the very least, the presence of an executable file that follows the guideline of returning either 1 or 0 to signify the completion status. Additionally, the manifest.yaml serves as metadata that allows MarkBench to identify it; however, for now, we can disregard it. @@ -78,12 +78,12 @@ The run directory, on the other hand, is the designated location for all outputs Logo -3. From this directory run the command +3. From this directory run the command ```powershell -python .\msikombuster.py --test vkfurrytorus --resolution "1080,1920" -b true +python .\msikombustor.py --test vkfurrytorus --resolution "1080,1920" -b true ``` -Executing this command initiates MSI Kombustor in benchmark mode, specifically launching the (VK) FurMark-Donut test at a resolution of 1920 x 1080. After the benchmark run concludes, you'll find the log and any captured assets stored within the **msikombuster/run** directory. +Executing this command initiates MSI Kombustor in benchmark mode, specifically launching the (VK) FurMark-Donut test at a resolution of 1920 x 1080. After the benchmark run concludes, you'll find the log and any captured assets stored within the **msikombustor/run** directory. It's important to note that the arguments required for each harness may vary. To ensure smooth test execution, consult the README of each harness, which provides detailed instructions on any unique requirements for running that specific test. @@ -112,7 +112,7 @@ output_dir: "run" options: - name: scene type: select - values: [all, classroom, junkshop, monster] + values: [all, classroom, junkshop, monster] - name: version type: select values: ["3.6.0", "3.5.0", "3.4.0", "3.3.0"] @@ -133,17 +133,17 @@ Any test that isn't a game *should* include a report for MarkBench to upload to - **version** string - applicable version of the test or program under test. This property is optional if no version is available. - **score** string - a scalar output from the test. This could be a benchmark score, or duration. - **unit** string - the unit of measurement of the scalar. If duration, this could be seconds or minutes. If the score is simply a score, than this property can be omitted or left empty. -- **label** string - optional friendly name for the unit of measurement. For example "fps" vs "Frames Per Second". This property is mainly used to override an axis on a graph downstream. +- **label** string - optional friendly name for the unit of measurement. For example "fps" vs "Frames Per Second". This property is mainly used to override an axis on a graph downstream. The JSON report can be a single object, or array of reports, indicating to MarkBench there is more than one result to record. ```json -{ - "test": "FireStrike", +{ + "test": "FireStrike", "version": "4.5.1", "score": "16099", "unit": "", "label": "", - "start_time": 1702514174861, + "start_time": 1702514174861, "end_time": 1702514209166 } ``` @@ -152,9 +152,9 @@ The JSON report can be a single object, or array of reports, indicating to MarkB #### Game Report Game reports don't require a report as the score is the FPS which is calculated downstream of MarkBench. It is helpful if the report does include things such as resolution, start time, and end time. ```json -{ - "resolution": "1920x1080", - "start_time": 1702514174861, +{ + "resolution": "1920x1080", + "start_time": 1702514174861, "end_time": 1702514209166 } ``` diff --git a/cspell.json b/cspell.json index 411baa3..8713b7c 100644 --- a/cspell.json +++ b/cspell.json @@ -37,7 +37,6 @@ "dmdef", "firestrikegraphicsscorep", "myresults", - "msikombuster", "msikombustor", "isfile", "rstrip", @@ -45,7 +44,7 @@ "vkfurrytorus", "GPGPU", "Stellaris", - "shusaura", + "shusaura", "wukong" ], "ignoreRegExpList": [ diff --git a/msikombuster/msikombuster.py b/msikombuster/msikombuster.py deleted file mode 100644 index efa3ec1..0000000 --- a/msikombuster/msikombuster.py +++ /dev/null @@ -1,59 +0,0 @@ -"""MSI Kombustor test script""" -from subprocess import Popen -import os -import logging -import sys -from pathlib import Path -from msi_kombustor_utils import ( - parse_args, - parse_resolution, - parse_score, - create_arg_string -) - -PARENT_DIR = str(Path(sys.path[0], "..")) -sys.path.append(PARENT_DIR) - -from harness_utils.output import ( - write_report_json, - format_resolution -) - -INSTALL_DIR = r"C:\Program Files\Geeks3D\MSI Kombustor 4 x64" -EXECUTABLE = "MSI-Kombustor-x64.exe" - -args = parse_args() - -script_dir = os.path.dirname(os.path.realpath(__file__)) -log_dir = os.path.join(script_dir, "run") -if not os.path.isdir(log_dir): - os.mkdir(log_dir) -LOGGING_FORMAT = '%(asctime)s %(levelname)-s %(message)s' -logging.basicConfig(filename=f'{log_dir}/harness.log', - format=LOGGING_FORMAT, - datefmt='%m-%d %H:%M', - level=logging.DEBUG) -console = logging.StreamHandler() -formatter = logging.Formatter(LOGGING_FORMAT) -console.setFormatter(formatter) -logging.getLogger('').addHandler(console) - - -cmd = f'{INSTALL_DIR}/{EXECUTABLE}' - -h, w = parse_resolution(args.resolution) -argstr = create_arg_string(w, h, args.test, args.benchmark) - -with Popen([cmd, argstr]) as process: - EXIT_CODE = process.wait() - -log_path = os.path.join(INSTALL_DIR, "_kombustor_log.txt") -score = parse_score(log_path) - -report = { - "resolution": format_resolution(w, h), - "test": args.test, - "score": score -} - -write_report_json(log_dir, "report.json", report) diff --git a/msikombuster/README.md b/msikombustor/README.md similarity index 100% rename from msikombuster/README.md rename to msikombustor/README.md diff --git a/msikombuster/manifest.yaml b/msikombustor/manifest.yaml similarity index 93% rename from msikombuster/manifest.yaml rename to msikombustor/manifest.yaml index 951f6b8..d564641 100644 --- a/msikombuster/manifest.yaml +++ b/msikombustor/manifest.yaml @@ -1,5 +1,5 @@ -friendly_name: "MSI Kombuster" -executable: "msikombuster.py" +friendly_name: "MSI Kombustor" +executable: "msikombustor.py" process_name: "MSI-Kombustor-x64.exe" output_dir: "run" options: diff --git a/msikombuster/msi_kombustor.png b/msikombustor/msi_kombustor.png similarity index 100% rename from msikombuster/msi_kombustor.png rename to msikombustor/msi_kombustor.png diff --git a/msikombuster/msi_kombustor_utils.py b/msikombustor/msi_kombustor_utils.py similarity index 100% rename from msikombuster/msi_kombustor_utils.py rename to msikombustor/msi_kombustor_utils.py diff --git a/msikombustor/msikombustor.py b/msikombustor/msikombustor.py new file mode 100644 index 0000000..4401348 --- /dev/null +++ b/msikombustor/msikombustor.py @@ -0,0 +1,65 @@ +"""MSI Kombustor test script""" +from subprocess import Popen +import os +import logging +import sys +from pathlib import Path +from msi_kombustor_utils import ( + parse_args, + parse_resolution, + parse_score, + create_arg_string +) + +PARENT_DIR = str(Path(sys.path[0], "..")) +sys.path.append(PARENT_DIR) + +from harness_utils.output import ( + write_report_json, + format_resolution, + DEFAULT_LOGGING_FORMAT, + DEFAULT_DATE_FORMAT +) + +INSTALL_DIR = r"C:\Program Files\Geeks3D\MSI Kombustor 4 x64" +EXECUTABLE = "MSI-Kombustor-x64.exe" + +def main(): + """main""" + args = parse_args() + + script_dir = Path(__file__).resolve().parent + log_dir = script_dir.joinpath("run") + log_dir.mkdir(exist_ok=True) + logging.basicConfig(filename=f'{log_dir}/harness.log', + format=DEFAULT_LOGGING_FORMAT, + datefmt=DEFAULT_DATE_FORMAT, + level=logging.DEBUG) + console = logging.StreamHandler() + formatter = logging.Formatter(DEFAULT_LOGGING_FORMAT) + console.setFormatter(formatter) + logging.getLogger('').addHandler(console) + + + cmd = f'{INSTALL_DIR}/{EXECUTABLE}' + + h, w = parse_resolution(args.resolution) + argstr = create_arg_string(w, h, args.test, args.benchmark) + + with Popen([cmd, argstr]) as process: + process.wait() + + log_path = os.path.join(INSTALL_DIR, "_kombustor_log.txt") + score = parse_score(log_path) + + report = { + "resolution": format_resolution(w, h), + "test": args.test, + "score": score + } + + write_report_json(log_dir, "report.json", report) + + +if __name__ == "__main__": + main() diff --git a/pugetbench/pugetbench.py b/pugetbench/pugetbench.py index 98c618f..035572f 100644 --- a/pugetbench/pugetbench.py +++ b/pugetbench/pugetbench.py @@ -82,7 +82,7 @@ def main(): if version is None: version = get_premierepro_version() elif args.app == "photoshop": - test = "PugentBench Adobe Photoshop" + test = "PugetBench Adobe Photoshop" if version is None: version = get_photoshop_version() diff --git a/pugetbench/utils.py b/pugetbench/utils.py index 70ad259..72c3c85 100644 --- a/pugetbench/utils.py +++ b/pugetbench/utils.py @@ -37,7 +37,7 @@ def find_latest_log(): def find_score_in_log(log_path): - """find score in pugentbench log file""" + """find score in pugetbench log file""" with open(log_path, 'r', encoding="utf-8") as file: for line in file: score = is_score_line(line)