Skip to main content

Software for benchmarking scientific software.

Project description

info-badge github-release-badge pypi-badge zenodo-badge ci-tests-badge

Introduction

galitime benchmarks commands and records timing and resource statistics in a simple tab-delimited format. It wraps the system time command, normalizes the output into stable column names, and can repeat commands across multiple runs. This is particularly helpful for benchmarking research tools and workflows that need to be tested and evaluated on different platforms.

The tool is inspired by the benchmarking script in Phylign, originally developed by Leandro Lima.

Quick example

Install from PyPI:

pip install -U galitime

Benchmark a command and print the result to standard output:

galitime -l stdout "sleep 0.1"

Write the benchmark output to a file:

galitime --log time.log "ls"

Use GNU Time explicitly:

galitime --gtime -l stdout "sleep 0.1"

Installation

Requirements

  • Python 3.7 or newer

  • A working time command on the host system

On macOS, you can optionally install GNU Time with Homebrew:

brew install gnu-time

galitime uses the default time command by default. If GNU Time is available, run with --gtime to use it explicitly.

Using Bioconda

conda install -y -c bioconda -c conda-forge galitime

Using PyPI

pip install -U galitime

Standalone usage

The top-level galitime file is the canonical standalone executable.

chmod +x ./galitime
./galitime -l stdout "sleep 0.1"

This is useful when copying a single executable into another repository, container image, or remote environment.

CLI

Program: galitime (benchmarking of computational experiments using GNU time)
Version: 0.3.0
Contact: Karel Brinda <karel.brinda@inria.fr>

usage: galitime [-r INT] [-g] [-l FILE] [-n STR] [-s STR] command

positional arguments:
  command              the command to be benchmarked

optional arguments:
  -h                   show this help message and exit
  -v                   show program's version number and exit
  -r INT, --reps INT   number of repetitions [1]
  -g, --gtime          call gtime instead of time (useful on MacOS)
  -l FILE, --log FILE  output (filename/stderr/stdout) [stderr]
  -n STR, --name STR   name of the experiment (for output)
  -s STR, --shell STR  shell for execution [/bin/bash]

Output columns

galitime writes tab-delimited output with these columns:

  1. experiment – experiment name supplied with -n/--name; otherwise empty

  2. run – repetition number when -r/--reps is greater than 1; otherwise empty

  3. real_s – wall-clock time reported by time, in seconds

  4. real_s_py – wall-clock time measured by Python around the whole execution

  5. user_s – user CPU time in seconds

  6. sys_s – system CPU time in seconds

  7. percent_cpu – CPU usage percentage reported by time

  8. max_ram_kb – maximum resident memory in kilobytes

  9. fs_inputs – file system input operations

  10. fs_outputs – file system output operations

  11. exit_code – exit status of the benchmarked command

  12. command – normalized command string that was executed

Development

Repository layout

  • galitime – canonical standalone executable and main source file

  • galitime_pkg/ – packaging shim for the Python package / console entry point

  • tests/ – smoke tests and release checks

Common local commands

python -m pip install .
python -m build
make test

Issues

Please use GitHub issues.

Changelog

See Releases.

License

MIT

Contact

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

galitime-0.3.0.tar.gz (9.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

galitime-0.3.0-py3-none-any.whl (10.2 kB view details)

Uploaded Python 3

File details

Details for the file galitime-0.3.0.tar.gz.

File metadata

  • Download URL: galitime-0.3.0.tar.gz
  • Upload date:
  • Size: 9.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.9.19

File hashes

Hashes for galitime-0.3.0.tar.gz
Algorithm Hash digest
SHA256 66ed1ad4b16ed88adfcde3ad448204bde791bebc2b0ef62c7053fdf60509d539
MD5 01eff92a1e51e4dc8fe4cb94f26b336c
BLAKE2b-256 4df0346adc4a16970685b9fdbcd0b7da0788a3164cc55fcb85851dc2f7c61b95

See more details on using hashes here.

File details

Details for the file galitime-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: galitime-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 10.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.9.19

File hashes

Hashes for galitime-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 dbe737c45ae489e4486c1fe8ba46e6c06c0828f63100e2a436aeeb3af5639981
MD5 dcd13ec9bb455f5efccac25667233b24
BLAKE2b-256 1d8cecadf9e6ad038128a0f0d155d9823c2f3b64c3d72973bba0cc575910ef96

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page