Skip to main content

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

Release files for galitime 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for galitime 0.3.0
File Size Uploaded
galitime-0.3.0.tar.gz 9.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for galitime 0.3.0
File Interpreter ABI Platform
galitime-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 19.7 kB

Release files / galitime-0.3.0.tar.gz

Download URL galitime-0.3.0.tar.gz
Size 9.5 kB
Tags Source
SHA-256 checksum
How to use checksums
66ed1ad4b16ed88adfcde3ad448204bde791bebc2b0ef62c7053fdf60509d539
BLAKE2b-256 checksum
How to use checksums
4df0346adc4a16970685b9fdbcd0b7da0788a3164cc55fcb85851dc2f7c61b95
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.9.19

Release files / galitime-0.3.0-py3-none-any.whl

Download URL galitime-0.3.0-py3-none-any.whl
Size 10.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dbe737c45ae489e4486c1fe8ba46e6c06c0828f63100e2a436aeeb3af5639981
BLAKE2b-256 checksum
How to use checksums
1d8cecadf9e6ad038128a0f0d155d9823c2f3b64c3d72973bba0cc575910ef96
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.9.19

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files

0.2.0

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page