diff --git a/.github/workflows/go.yml b/.github/workflows/benchmark.yml similarity index 66% rename from .github/workflows/go.yml rename to .github/workflows/benchmark.yml index ec32be6..809267c 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/benchmark.yml @@ -1,4 +1,4 @@ -name: Go +name: Benchmark Golang Libraries on: push: @@ -7,7 +7,7 @@ on: branches: [ "master" ] jobs: - build: + Benchmark-Expression-Evaluation: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -27,6 +27,25 @@ jobs: run: | echo "Benchmark Expression Evaluation libraries" cd /home/runner/work/benchmark/benchmark/expression-evaluation && go test -bench=. -benchmem -count 5 -benchtime=10000x > results/results.out + + Benchmark-In-Memory-Cache: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: '1.20' + + - name: Dependencies + run: | + echo "Download Dependencies" + go mod tidy + go mod vendor + + - name: Benchmark + run: | echo "Benchmark In-Memory Cache libraries" cd /home/runner/work/benchmark/benchmark/in-memory-cache && go test -bench=. -benchmem -count 5 -benchtime=100000x > results/results.out diff --git a/README.md b/README.md index ccd8b04..3c7818f 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,10 @@ # Benchmark -Benchmarks of Golang libraries +A benchmark is a type of function that executes a code segment multiple times and compares each output against a standard, assessing the code’s overall performance level. [![Go](https://github.com/lkumarjain/benchmark/actions/workflows/go.yml/badge.svg)](https://github.com/lkumarjain/benchmark/actions/workflows/go.yml) +The idea of this repository to have multiple benchmarks of multiple Golang libraries at one place. + - [Benchmarks of expression evaluation libraries for Golang](./expression-evaluation/) - [Benchmarks of in-memory cache libraries for Golang](./in-memory-cache/)