Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add bench-go github actions #638

Merged
merged 3 commits into from
Mar 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading