computer-benchmark

command module
v0.0.0-...-b67c786 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 19, 2025 License: GPL-3.0 Imports: 9 Imported by: 0

README

computer-benchmark

Build

Some tools for benchmarking computer performance.

This repository contains a set of Go programs used to stress different components of a computer. Each benchmark focuses on a specific workload such as matrix multiplication, memory bandwidth (STREAM), FFT, sorting and cryptography. There are both single-threaded and multithreaded variants.

Run the benchmarks using go run . and choose which test to execute from the interactive menu.

Building the benchmarks

To compile the benchmark binary run:

go build -o benchmark

The above command produces an executable called benchmark in the current directory.

Running the benchmarks

After building, execute the benchmarks with:

./benchmark

Alternatively the code can be run directly without building using:

go run ./...

Executing unit tests

If unit tests are present they can be run with:

go test ./...

This command recursively executes all tests in the repository.

Configurable parameters

Benchmark sizes are controlled via constants within the source code. For example:

  • matrixMultiplicationSize in multithreaded/matrix_multiplication.go
  • streamArraySize in multithreaded/stream.go
  • dataSize in multithreaded/crypto.go

Modifying these constants allows changing the amount of work performed by each benchmark. There are currently no environment variables for configuration.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL