Skip to content

Commit

Permalink
update dependencies, replace build
Browse files Browse the repository at this point in the history
  • Loading branch information
emicklei committed Aug 4, 2024
1 parent 877656f commit 06c1347
Show file tree
Hide file tree
Showing 11 changed files with 81 additions and 170 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# This workflow will test a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go

name: Go

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

jobs:

build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.22'

- name: Test
run: go test -v ./...
6 changes: 0 additions & 6 deletions .travis.yml

This file was deleted.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# hazana - package for creating load tests of services

[![Build Status](https://travis-ci.org/emicklei/hazana.png)](https://travis-ci.org/emicklei/hazana)
[![GoDoc](https://godoc.org/github.com/emicklei/hazana?status.svg)](https://godoc.org/github.com/emicklei/hazana)
[![Go](https://github.com/emicklei/hazana/actions/workflows/go.yml/badge.svg)](https://github.com/emicklei/hazana/actions/workflows/go.yml)
[![GoDoc](https://pkg.go.dev/badge/github.com/emicklei/hazana)](https://pkg.go.dev/github.com/emicklei/hazana)

Hazana is created for load tests that use (generated) clients in Go to communicate to services (in any supported language).
By providing the Attack interface, any client and protocol could potentially be tested with this package.
Expand Down
4 changes: 2 additions & 2 deletions examples/grpc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ gen:
cp clock_grpc.pb.go server

server:
cd server && go run server.go clock.pb.go
cd server && go run .

load:
go run loadrun.go clock.pb.go -verbose -rps 2 -attack 20
go run . -verbose -rps 2 -attack 20
4 changes: 2 additions & 2 deletions examples/grpc/clock.pb.go

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

4 changes: 4 additions & 0 deletions examples/grpc/clock_grpc.pb.go

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

2 changes: 1 addition & 1 deletion examples/grpc/loadrun.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ type clockAttack struct {
}

func (c *clockAttack) Setup(hc hazana.Config) error {
conn, err := grpc.Dial("localhost:9090", grpc.WithInsecure())
conn, err := grpc.NewClient("localhost:9090", grpc.WithInsecure())
if err != nil {
log.Println("Dial failed:", err)
return err
Expand Down
4 changes: 2 additions & 2 deletions examples/grpc/server/clock.pb.go

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

4 changes: 4 additions & 0 deletions examples/grpc/server/clock_grpc.pb.go

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

23 changes: 15 additions & 8 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
module github.com/emicklei/hazana

go 1.14
go 1.21


require (
github.com/beorn7/perks v1.0.1
go.uber.org/atomic v1.9.0 // indirect
go.uber.org/ratelimit v0.2.0
golang.org/x/net v0.0.0-20220403103023-749bd193bc2b
golang.org/x/sys v0.0.0-20220406155245-289d7a0edf71 // indirect
google.golang.org/genproto v0.0.0-20220405205423-9d709892a2bf // indirect
google.golang.org/grpc v1.45.0
google.golang.org/protobuf v1.28.0
go.uber.org/ratelimit v0.3.1
golang.org/x/net v0.27.0
google.golang.org/grpc v1.65.0
google.golang.org/protobuf v1.34.2
)

require (
github.com/benbjohnson/clock v1.3.0 // indirect
github.com/stretchr/testify v1.9.0 // indirect
go.uber.org/atomic v1.11.0 // indirect
golang.org/x/sys v0.23.0 // indirect
golang.org/x/text v0.16.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240725223205-93522f1f2a9f // indirect
)
171 changes: 24 additions & 147 deletions go.sum

Large diffs are not rendered by default.

0 comments on commit 06c1347

Please sign in to comment.