Skip to content

toprakmurat/Benchmarker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

⚙️ Benchmarker

A simple CPU benchmarker written in C++, focused on running basic arithmetic tests to evaluate CPU performance.


🧠 About

Benchmarker runs a suite of low-level math workloads — including addition, multiplication, division, and more — to assess how a system’s CPU handles fundamental operations.
Ideal for quick, local performance insights.


🚀 Quick Start

Prerequisites

  • A C++ compiler (e.g., g++, clang++, or MSVC)
  • Make (optional, for using the provided Makefile)

Build

From the root directory:

make

Run

Execute the benchmark:

./benchmarker [options]

By default, it runs all tests, measures execution time, and prints results.

🧩 Features

  • Multiple arithmetic workloads: includes addition, multiplication, division, and more
  • 🔁 Configurable loop count: control the number of iterations per benchmark
  • 🧪 Command-line interface: run specific tests with customizable options
  • 📊 Time-based measurement: outputs elapsed time and average operation duration
  • 🧼 Clean and minimal C++ codebase: easy to understand, extend, and maintain
  • 🧩 Modular test design: add your own benchmarks with minimal effort
  • 🖥️ Single-threaded CPU stress: tests core computation performance without parallelism

📚 How It Works

  1. Test Suite: Benchmarker includes a set of arithmetic test functions (e.g., add, multiply, divide).
  2. Loop Execution: Each test is executed repeatedly for a defined number of iterations (e.g., 100 million times).
  3. Timing: Uses high-resolution timers (std::chrono) to measure the total time taken by each test.
  4. Result Reporting: Prints out:
    • Total time taken for the operation
    • Average time per operation (nanoseconds/op)
  5. CLI Integration: Command-line arguments allow users to choose specific tests and set loop counts.
  6. Performance Baseline: Helps compare CPU behavior across devices or compiler optimization levels.

About

A simple CPU Benchmarker software including basic arithmetic tests

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages