Skip to content
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
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ include Makefile.*
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# Variable Definitions #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
VERSION = $(shell git describe --match "v[0-9]*" --abbrev=0)
VERSION = $(shell git describe --match "v[0-9]*" --abbrev=0 --tags)
COMMIT = $(shell git rev-parse --short HEAD)
DATE = $(shell date +%F_%H-%M-%S)

Expand Down Expand Up @@ -74,7 +74,7 @@ lint: ## Run linter
cd sdk && make lint

format: ## Format code
cd sdk && go fmt ./...
go fmt ./... && cd sdk && go fmt ./... && cd ../test/performance && go fmt ./...

install-tools: ## Install dependencies in tools.go
@grep _ ./scripts/tools.go | awk '{print $$2}' | xargs -tI % go install %
Expand All @@ -84,11 +84,11 @@ install-tools: ## Install dependencies in tools.go
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
local-apk-package: ## Create local apk package
GOWORK=off CGO_ENABLED=0 GOARCH=${LOCAL_ARCH} GOOS=linux go build -ldflags=${DEBUG_LDFLAGS} -o ./build/nginx-agent
VERSION=$(shell echo ${VERSION} | tr -d 'v') nfpm pkg --config ./scripts/.local-nfpm.yaml --packager apk --target ./build/${PACKAGE_PREFIX}-$(shell echo ${VERSION} | tr -d 'v')-SNAPSHOT.apk;
VERSION=$(shell echo ${VERSION} | tr -d 'v') nfpm pkg --config ./scripts/.local-nfpm.yaml --packager apk --target ./build/${PACKAGE_PREFIX}-$(shell echo ${VERSION} | tr -d 'v')-SNAPSHOT-${COMMIT}.apk;

local-deb-package: ## Create local deb package
GOWORK=off CGO_ENABLED=0 GOARCH=${LOCAL_ARCH} GOOS=linux go build -ldflags=${DEBUG_LDFLAGS} -o ./build/nginx-agent
VERSION=$(shell echo ${VERSION} | tr -d 'v') nfpm pkg --config ./scripts/.local-nfpm.yaml --packager deb --target ./build/${PACKAGE_PREFIX}-$(shell echo ${VERSION} | tr -d 'v')-SNAPSHOT.deb;
VERSION=$(shell echo ${VERSION} | tr -d 'v') nfpm pkg --config ./scripts/.local-nfpm.yaml --packager deb --target ./build/${PACKAGE_PREFIX}-$(shell echo ${VERSION} | tr -d 'v')-SNAPSHOT-${COMMIT}.deb;

local-rpm-package: ## Create local rpm package
GOWORK=off CGO_ENABLED=0 GOARCH=${LOCAL_ARCH} GOOS=linux go build -ldflags=${DEBUG_LDFLAGS} -o ./build/nginx-agent
Expand Down
4 changes: 2 additions & 2 deletions src/core/pipe.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func (p *MessagePipe) Register(size int, plugins ...Plugin) error {
p.mu.Lock()

p.plugins = append(p.plugins, plugins...)
p.bus = messagebus.New(size)
p.bus = messagebus.New(size)

for _, plugin := range p.plugins {
for _, subscription := range plugin.Subscriptions() {
Expand Down Expand Up @@ -75,7 +75,7 @@ func (p *MessagePipe) Run() {
for {
select {
case <-p.ctx.Done():

for _, r := range p.plugins {
r.Close()
}
Expand Down
6 changes: 3 additions & 3 deletions test/performance/advanced-metrics/metric_gen/generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ package metric_gen

import (
"context"
"crypto/rand"
"fmt"
"math"
"math/big"
"crypto/rand"
"strconv"
"strings"
"sync"
Expand Down Expand Up @@ -38,7 +38,7 @@ type Generator struct {
messageCache []*Message
cacheLock sync.Mutex

iterator int
iterator int

setMetrics bool
setMetricsSets []string
Expand Down Expand Up @@ -203,7 +203,7 @@ func (g *Generator) makeMetricSet(uniqueDimension bool) string {
// choose one string dimension that will be unique
uniqueDimPositionBig, _ := rand.Int(rand.Reader, big.NewInt(int64(len(fieldOrder))))
for fieldOrder[uniqueDimPositionBig.Int64()].Type != stringType {
uniqueDimPositionBig, _ = rand.Int(rand.Reader, big.NewInt(int64(len(fieldOrder)) - 8))
uniqueDimPositionBig, _ = rand.Int(rand.Reader, big.NewInt(int64(len(fieldOrder))-8))
}
uniqueDimPosition := int(uniqueDimPositionBig.Int64())

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading