Coder Social home page Coder Social logo

bash_benchmark_test's Introduction

bash_benchmark_test

This repository is a tool to measure a simple benchmark of shell scripts executed by bash.

Demo

sample gif image Demo

Description

bash_benchmark_test is a simple benchmark test script that detects shell script speed, memory used at runtime, and errors. Benchmark test can be executed by arranging it in the same hierarchy as the shel script to be measered and loading it when the shell script is executed. This script is a code that can be executed only with bash. It does not run in other shells.

Requirment

Kernel Version :
Linux5.8.0-50-generic

bash :
GNU bash, バージョン 5.0.17(1)-release (x86_64-pc-linux-gnu) Copyright (C) 2019 Free Software Foundation, Inc. ライセンス GPLv3+: GNU GPL バージョン 3 またはそれ以降 http://gnu.org/licenses/gpl.html

This is free software; you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.

Installation

sudo apt-get update

Usage

example) 1.en running a benchmark test of sample_script.sh, place benchmark.sh in the same directory.

UbunutPC:~/shellscript$ ls -l bash_benchmark_test/
合計 12
-rwxrwx--- 1 ubuntu ubuntu 1228  4月 24 22:49 benchmark.sh
-rw-rw-r-- 1 ubuntu ubuntu  257  4月 24 22:48 sample_script.sh
  1. The add the following code to the beginnig of the shell script you want to test code.
#!bin/bash
#
# sample script

# Load batch script
. ./benchmark.sh

## main ###

Note

I don't test environments under Mac

Author

License

GNU bash, バージョン 5.0.17(1)-release (x86_64-pc-linux-gnu) Copyright (C) 2019 Free Software Foundation, Inc. ライセンス GPLv3+: GNU GPL バージョン 3 またはそれ以降 http://gnu.org/licenses/gpl.html

bash_benchmark_test's People

Contributors

hskm07 avatar

Watchers

 avatar

bash_benchmark_test's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.