Skip to main content

description

Project description

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

Introduction

Software for benchmarking programs using the GNU Time command, with extensive benchmarking options and unified behaviour across platforms (including output units). Inspired by the benchmarking script in Phylign developed by Leandro Lima.

Quick example

$ if [[ $(uname) == "Darwin" ]]; then brew install gnu-time; fi
$ conda install -y -c bioconda -c conda-forge galitime

$ galitime --log time.log ls

$ cat time.log
real_s  user_s  sys_s   percent_cpu max_ram_kb  exit_code   fs_inputs   fs_outputs  real_s_alt  command
0.03    0.00    0.00    10% 2904    0   0   0   0.076661    ls

Installation

Dependencies

Galitime has no dependencies beyond Python 3. While it used to require gtime on OS X, this dependency is no longer required and the default time command is used.

Using Bioconda

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

Using PyPI

Install the Galitime Python package:

pip install -U galitime

Command-line parameters

$ galitime -h
usage: galitime [-h] --log LOG [--experiment EXPERIMENT] [-v] command

Benchmark a command.

positional arguments:
  command               The command to be benchmarked

options:
  -h, --help            show this help message and exit
  --log LOG             Path to the log file with benchmark statistics (if the directory doesn't exist, it will be created).
  --experiment EXPERIMENT
                        Name of the experiment (to be attached to the output)
  -v                    show program's version number and exit

Output

  • experiment - Name of the experiment, if provided via -n

  • run - Number of run in case of multiple repetitions

  • real_s - Real time in seconds (wall clock time)

  • real_s_py - Python-measured real time in seconds (slightly higher than real_s)

  • user_s - User CPU time in seconds (user mode, excluding system calls)

  • sys_s - System CPU time in seconds (kernel mode)

  • percent_cpu - CPU usage percentage

  • max_ram_kb - Maximum RAM usage in kilobytes

  • exit_code - Exit code of the command (0 if everything ok, -1 if command failed)

  • fs_inputs - File system read read operations count

  • fs_outputs - File system write operations count

  • command - Command executed, with tabs replaced by spaces

Issues

Please use Github issues.

Changelog

See Releases.

Licence

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.2.0.tar.gz (7.7 kB view details)

Uploaded Source

Built Distribution

galitime-0.2.0-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: galitime-0.2.0.tar.gz
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.8

File hashes

Hashes for galitime-0.2.0.tar.gz
Algorithm Hash digest
SHA256 c791725b9bfe79fbac42be1cbb53e2b64d10a4c41cb7d9504acaa2e412d5dc90
MD5 468213bfc4eeff48ab927a089f3e0fee
BLAKE2b-256 8487a7bac2ced008d7eadb7c95d1d184e76ce279a5b1b7174f6f960e56f1e522

See more details on using hashes here.

File details

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

File metadata

  • Download URL: galitime-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 8.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.8

File hashes

Hashes for galitime-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0a692781b7b0e03b1156e2ad2348bc340804a10190f4601a94c6bd53881723ad
MD5 4ad05c55add487519b17197594e7191e
BLAKE2b-256 95a4e6474a84d70a6d4b6163ee6734f83e38cb43b9e58ec5e706b79f4df407bd

See more details on using hashes here.

Supported by

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