Skip to content
This repository has been archived by the owner on Sep 13, 2023. It is now read-only.
/ bench-cli Public archive

Cross-platform command line tool to benchmark commands and other executables/scripts in command lines written in `Fortran`. Very precise and fast.

License

Notifications You must be signed in to change notification settings

Lateralus138/bench-cli

Repository files navigation

Bench CLI

ANNOUNCEMENT: THIS PROJECT IS OFFICIALLY DISCONTINUED AND ARCHIVED. A C++ version has been started will be coming the next couple of months. The previously mentioned RustLang version has been scrapped as I can write perfectly safe C++ code (it was nice learning about Rust in the 20+ projects I've done with it, but it is just unnecessary for my needs).

Cross-platform command line tool to benchmark commands and other executables/scripts in command lines written in Fortran. Very precise and fast.

NOTE: I'm going to be redoing this repository soon with a possible refractor coming not long after. It's also possible I'll be writing a more portable version in RustLang, but I'm a little skeptical because while Rust is certainly fast, Fortran is a BEAST.


Support Me If You Like

If you like this project and care to donate to my PayPal:

PayPal Donation

Or Buy Me A Coffee if your prefer:

Buy Me A Coffee


Disclaimers

I am working on a different version of this written in C++ that works just as well, if not better, and has some more features. Coming very soon.

Disclaimer 1 The Windows version of this is missing 3 library (DLL) dependecies that can be provided by installing the MinGW version of GCC and GFORTRAN (95) packages and making sure that the MinGW bin directory is in your %PATH%.

I will be working on providing these dependencies soon in one way or another, but I have to put it on hold for a short period of time.

The 3 libraries that are missing are as follows:

  • libgcc_s_dw2-1.dll
  • libgfortran-5.dll
  • libquadmath-0.dll

More information can be found below in the Dependencies Section.

Disclaimer 2 This works great over most commands, but it can be a bit testy with a few commands depending on the output unless they are in placed in a script and then benchmark the script, of course. Not much difference in results when we are usually just looking for averages speeds in the first place.
Build Status
AppImage Build Status AppImage Build Status

Fortran Programming Utility Command Line Utility Windows Utility Linux

Total Downloads This Project
Total Downloads

Table of Contents

Motivation

I like to benchmark EVERYTHING. Plain and simple.

Usage

Usage is the same in both Windows and Linux. In Linux there are 2 options; a small executable that depends on gcc/gfortran or an .AppImage that has all dependencies included. The Windows version has an executable and depends on gcc/gfortran as well; here I have used the MinGW versions. For the Linux version I have an AppImage for as a single distibutable package, but I need to come up with a way to do so for the Windows version. For now you can install the afore mentioned packages in both operating systems.

See For Vs. While for a basic example. This can be used in many ways.

Command Line

 $ bench --help

 USAGE: bench [OPTIONS]... COMMAND... 
 Benchmark command line commands...

 OPTIONS:
     -h, --help      This help message.
     -a, --alternate Use alternate shell.
                     Bash in Linux.
                     PowerShell in Windows.
     --nonverbose    Run command silently.
                     While running non-verbosely
                     it may be better to wrap
                     the command in quotes.

 EXIT CODES:
     0               No errors.
     1               No paramters passed.
     2               Error in given command.

 $ bench "ls /usr/bin" --nonverbose
 10ms
 $

Linux Permissions

You may have to set the files permissions to be executable in Linux.

Set executable for $USER only:

 $ chmod u+x /path/to/bench

Or for everyone:

 $ chmod 755 /path/to/bench-x86_64.AppImage

Dependencies

As stated above this program depends on a few libraries from 2 programs (GCC and GFORTRAN) that can be installed in both Windows and Linux.

Linux Dependencies

Installing GCC and GFORTRAN in various Linux distributions:

Libraries needed:

  • libc.so
  • libgfortran.so.4
  • libm.so.6
  • libquadmath.so.0
'APT' Based
 $ sudo apt install gcc gfortran # add -y to skip affirmation.
Other packaging systems

I'm sorry, there are various ways to install these package in other packaging systems and it looks like they are under various names, but you should be able to figure out their names by the 2 names provided here.

Windows Dependencies

Installing GCC and GFORTRAN in various Windows distributions:

Libraries needed:

  • libgcc_s_dw2-1.dll
  • libgfortran-5.dll
  • libquadmath-0.dll

I have installed these using the MinGW environment from here:

MinGW @ SourceForge

The c:/mingw/bin directory (or wherever your bin directory is located) must be present in %PATH%.

Files

These should be all up-to-date files, but the Continuous Build release page should always be the "Current Release". Link can be found in Project Links below.

File Description
Source Files - All Complete project - no compilations.

Linux Files

File Description
Source Files Linux source - no compilations.
Compiled Compiled binary executable without dependencies.
Source Files - AppImage AppImage source.
Compiled - AppImage .AppImage with dependencies included. An AppImage can be renamed to whatever you like.

Windows Files

File Description
Source Files Windows source - no compilations.
Compiled Compiled binary executable.

Project Links

AppImage Hub

Media

Help

Help Message

For Vs. While Example

Example

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

About

Cross-platform command line tool to benchmark commands and other executables/scripts in command lines written in `Fortran`. Very precise and fast.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published