Skip to content

Commit

Permalink
add bench-go github actions (#638)
Browse files Browse the repository at this point in the history
* Add bench-go github actions
* Update README.md
  • Loading branch information
dmachard authored Mar 5, 2024
1 parent 9bff9a7 commit 612df9e
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 2 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/bench-go.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: bench go

on:
push:
paths-ignore:
- 'docs/**'
- 'README.md'
branches:
- main
pull_request:
paths-ignore:
- 'docs/**'
- 'README.md'
branches:
- main

permissions:
contents: read

jobs:
dev:
strategy:
matrix:
os-version: ['ubuntu-22.04' ]
go-version: [ '1.20', '1.21' ]
runs-on: ${{ matrix.os-version }}

steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}

- name: Show Go version
run: |
go version
sudo go version
- name: Set up Go for root
if: runner.os != 'macOS'
run: |
which go
sudo which go
sudo ln -sf `which go` `sudo which go` || true
- name: Show Go version
run: |
go version
sudo go version
- name: Bench
run: |
cd dnsutils/
go test -run=^$ -bench=.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<img src="https://goreportcard.com/badge/github.com/dmachard/go-dns-collector" alt="Go Report"/>
<img src="https://img.shields.io/badge/go%20version-min%201.20-green" alt="Go version"/>
<img src="https://img.shields.io/badge/go%20tests-429-green" alt="Go tests"/>
<img src="https://img.shields.io/badge/go%20tests-8-green" alt="Go bench"/>
<img src="https://img.shields.io/badge/go%20lines-38661-green" alt="Go lines"/>
</p>

Expand Down Expand Up @@ -63,8 +64,8 @@
- [`Loki`](docs/loggers/logger_loki.md)
- [`ElasticSearch`](docs/loggers/logger_elasticsearch.md)
- [`Scalyr`](docs/loggers/logger_scalyr.md)
- [`Redis`](docs/loggers/logger_redis.md)
- [`Kafka`](docs/loggers/logger_kafka.md)
- [`Redis`](docs/loggers/logger_redis.md) publisher
- [`Kafka`](docs/loggers/logger_kafka.md) producer
- *Send to security tools*
- [`Falco`](docs/loggers/logger_falco.md)

Expand Down Expand Up @@ -111,6 +112,7 @@ The [`_examples`](./docs/_examples) folder from documentation contains a number
The [`_integration`](./docs/_integration) folder contains DNS-collector `configuration` files and `docker compose` examples for popular tools:

- [Elasticsearch](./docs/_integration/elasticsearch/README.md)
- [Kafka](./docs/_integration/kafka/README.md)

## Performance

Expand Down

0 comments on commit 612df9e

Please sign in to comment.