Skip to content

Commit c8f90fd

Browse files
TriTechXTriTechX
authored andcommitted
readability updates and various fixes
1 parent 9e213b5 commit c8f90fd

22 files changed

Lines changed: 139 additions & 14 deletions

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
extra
2-
corebench_env
2+
corebench_env
3+
*.zip
4+
LICENSE
5+
meta.json

corebench.bat

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
11
@echo off
2+
REM ========================
3+
REM CoreBench runner file
4+
REM author: T. de R-R
5+
REM license: Apache-2.0
6+
REM date: 07.01.26
7+
REM ========================
8+
REM ../corebench.bat
9+
10+
REM variables are made local to the script and evaluated at execution time
211
setlocal ENABLEDELAYEDEXPANSION
312

413
REM ensure local dir
@@ -14,6 +23,8 @@ REM Ensure Python 3.14
1423
echo %INFO% Ensuring Python 3.14 is installed...
1524

1625
py -3.14 -c "import sys" >nul 2>&1
26+
27+
REM !=
1728
IF %ERRORLEVEL% NEQ 0 (
1829
echo %INFO% Python 3.14 not detected. Installing, elevation may be required...
1930

corebench.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
11
#!/bin/bash
2+
#
3+
# CoreBench runner script
4+
#
5+
# Author: T. de R-R
6+
# License: Apache-2.0
7+
# Date: 07.01.26
8+
#
9+
# ../corebench.sh
210

311
# Colors
412
INFO="\033[90m" # grey

src/corebench.py

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
1-
### imports
1+
# corebench.py
2+
"""
3+
The main entry point for CoreBench.
4+
5+
Executing this script starts the program
6+
depending on execution context.
7+
8+
author: T. de R-R
9+
license: Apache-2.0
10+
date: 05.12.25
11+
"""
12+
# corebench.py
213

3-
## built in
414
import time, os, socket, multiprocessing, \
515
threading, math, platform, random, \
616
subprocess, re, getpass, csv, sys, \
@@ -9,13 +19,11 @@
919

1020
from datetime import datetime
1121

12-
## third party
1322
import cpuinfo, psutil, GPUtil, distro, \
1423
speedtest, matplotlib as mpl, \
1524
matplotlib.pyplot as plt, numpy as np, \
1625
requests
1726

18-
# initiate
1927
mpl.use("Agg")
2028

2129
## corebench utils
@@ -87,27 +95,23 @@ def initiate():
8795
sc - single core test,
8896
mt - multithread test)""")
8997

90-
# # Argument 2
91-
# parser.add_argument("--d", action="store_true", help="Enable dynamic mode")
92-
93-
# # Argument 2
94-
# parser.add_argument("--r", action="store_true", help="Show test results after the test has completed.")
95-
9698
# Argument 2 (secret)
9799
parser.add_argument(
98100
"--m",
99101
action="store_true",
100102
help="This is used by the initialisation bash script as an indicator to run the full application. Not recommended to pass as a terminal argument without being in the CoreBench virtual environment."
101103
)
102-
104+
105+
# Argument 3 - for developers that want to zip their CoreBench version
103106
parser.add_argument(
104107
"--b",
105108
nargs="?",
106109
const=f"CoreBench-v{utils.remove_char(env.version, '.')}.zip",
107-
default=f"CoreBench-v{utils.remove_char(env.version, '.')}.zip",
110+
default=False,
108111
help="Compress a CoreBench redistributable 'build'"
109112
)
110113

114+
# parse the args from execution
111115
args=parser.parse_args()
112116

113117
if args.m:
216 Bytes
Binary file not shown.
130 Bytes
Binary file not shown.
91 Bytes
Binary file not shown.
129 Bytes
Binary file not shown.
170 Bytes
Binary file not shown.
133 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)