Skip to content

Feature/cpuinfo - #176

Merged
DigitalInBlue merged 13 commits into
DigitalInBlue:developfrom
fidgetaryan445:feature/cpuinfo
Aug 12, 2026
Merged

Feature/cpuinfo#176
DigitalInBlue merged 13 commits into
DigitalInBlue:developfrom
fidgetaryan445:feature/cpuinfo

Conversation

@fidgetaryan445

Copy link
Copy Markdown

Tried adding a CPUInfo{.h/.cpp} similar to Memory{.h/.cpp}

timmyL17 and others added 13 commits October 6, 2025 07:07
Guard against a null problemSpace in ExperimentResult accessors (Value, Iterations, UsPerCall, UnitsPerSecond) to avoid dereferencing null pointers; return sensible defaults when absent. Add unit tests (and include them in test CMake) that validate null-safety and preserve behavior with a valid problemSpace.
Add null checks for fopen("/proc/self/status") and return -1 on failure to avoid dereferencing a null FILE* in GetRAMPhysicalUsedByCurrentProcess, GetRAMPhysicalUsedByCurrentProcessPeak, and GetRAMVirtualUsedByCurrentProcess. This prevents crashes when the status file cannot be opened.
Guard against dereferencing null pointers by:
- Returning nullptr when an experiment lookup by name fails.
- Early-returning from executor when an experiment's benchmark is null.
- Checking for null user-defined-measurement collectors before iterating.

These checks prevent crashes when optional/absent objects are encountered during runtime and make code paths null-safe.
…ivision-by-zero in rate calc, and add macOS RAM usage via host_statistics64

Add mutex protection around global experiment/result callback vectors to make registration and invocation safe from concurrent access. Simplify Archive result loading by using operator>> in the loop condition to avoid eof/tellg misuse. Cache us-per-call and check for non-positive values before computing calls-per-second to avoid division-by-zero. On macOS, use host_statistics64 (with mach_host_self) and page counts to compute system RAM used, and include the necessary mach header.
… available pagefile

- Correct spelling of "Available tests" in CLI output.
- Use std::next when advancing histogram iterators to simplify and clarify code.
- Cache fixture created from factory to avoid multiple Create() calls and repeated construction.
- Fix ExperimentResult::getRAM return type to int64_t to match signature.
- Return available page file (ullAvailPageFile) instead of total page file for virtual available RAM calculation.

These are small correctness and clarity fixes; no behavior changes beyond correcting reported values and eliminating redundant object creation.
…nd updated CodeQL workflow; refresh README

Introduce a new GitHub Actions workflow that runs CMake builds and tests across Linux, Windows, and macOS with an expanded compiler matrix and vcpkg integration, plus a dedicated sanitizers job (AddressSanitizer). Replace the previous, smaller workflows with the updated multi-platform configuration. Add a modernized CodeQL workflow that initializes, builds with vcpkg, and runs analysis. Also update README: bump copyright year, tidy sponsors/build notes, and clarify C++14 requirement and wording.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@sonarqubecloud

sonarqubecloud Bot commented Aug 7, 2026

Copy link
Copy Markdown

@DigitalInBlue
DigitalInBlue merged commit cf77faf into DigitalInBlue:develop Aug 12, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants