Skip to content

Commit

Permalink
Add network/nptest module and update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
ritwikranjan committed Sep 13, 2024
1 parent 5fad5f7 commit a3cb332
Show file tree
Hide file tree
Showing 8 changed files with 506 additions and 189 deletions.
3 changes: 3 additions & 0 deletions network/benchmarks/netperf/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ Dockerbuild/*
Dockerbuildclient/*
nptests
netperf-w?.yaml
*.json
*.csv
*.jpg
*.png
Expand All @@ -11,4 +12,6 @@ netperf-w?.yaml
*.pyc
.vscode
data-*
kubeConfig
launch

7 changes: 2 additions & 5 deletions network/benchmarks/netperf/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,17 @@
#
# Args: --mode=worker --host=<service cluster ip> --port=5202
#
ARG GOLANG_VERSION=1.18
FROM golang:${GOLANG_VERSION} as builder
FROM golang:bullseye AS builder
WORKDIR /workspace

COPY nptest/nptest.go nptest.go
COPY go.sum go.sum
COPY nptest.go nptest.go
COPY go.mod go.mod

RUN go build -o nptests

FROM debian:bullseye
ENV LD_LIBRARY_PATH=/usr/local/lib

MAINTAINER Girish Kalele <[email protected]>
# install binary and remove cache
RUN apt-get update \
&& apt-get install -y curl wget net-tools gcc make libsctp-dev git autotools-dev automake \
Expand Down
13 changes: 8 additions & 5 deletions network/benchmarks/netperf/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,13 @@

all: docker push launch runtests

DOCKERREPO := girishkalele/netperf-latest
DOCKERREPO := $(or $(DOCKERREPO), girishkalele/netperf-latest)

docker: launch
mkdir -p Dockerbuild/nptest && \
mkdir -p Dockerbuild && \
cp -f Dockerfile Dockerbuild/ && \
cp -f nptest/nptest.go Dockerbuild/nptest/ && \
cp -f go.mod Dockerbuild/ && \
cp -f go.sum Dockerbuild/ && \
cp -f nptest/nptest.go Dockerbuild/ && \
cp -f nptest/go.mod Dockerbuild/ && \
docker build -t $(DOCKERREPO) Dockerbuild/

push: docker
Expand All @@ -44,4 +43,8 @@ runtests: launch
cp netperf-latest.csv plotperf && cd plotperf; make plot && mv *png .. && mv *svg ..
@echo Results file netperf-latest.csv and SVG/PNG graphs generated successfully

localtest: docker
docker push $(DOCKERREPO)
go run launch.go -image=$(DOCKERREPO) -json -kubeConfig ./kubeConfig


65 changes: 39 additions & 26 deletions network/benchmarks/netperf/go.mod
Original file line number Diff line number Diff line change
@@ -1,37 +1,50 @@
module k8s.io/perf-tests/network

go 1.22.4
go 1.23

require (
k8s.io/api v0.0.0-20181011064954-26c7a45db378
k8s.io/apimachinery v0.0.0-20181011064652-56cf97ad69c7
k8s.io/client-go v0.0.0-20181011105049-9b03088ac34f
k8s.io/api v0.31.0
k8s.io/apimachinery v0.31.0
k8s.io/client-go v0.31.0
)

require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/ghodss/yaml v1.0.1-0.20180820084758-c7ce16629ff4 // indirect
github.com/gogo/protobuf v1.1.2-0.20181010092945-fd322a3c4963 // indirect
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b // indirect
github.com/golang/protobuf v1.3.1 // indirect
github.com/google/btree v1.0.0 // indirect
github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf // indirect
github.com/googleapis/gnostic v0.2.3-0.20180520015035-48a0ecefe2e4 // indirect
github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/emicklei/go-restful/v3 v3.11.0 // indirect
github.com/fxamacker/cbor/v2 v2.7.0 // indirect
github.com/go-logr/logr v1.4.2 // indirect
github.com/go-openapi/jsonpointer v0.19.6 // indirect
github.com/go-openapi/jsonreference v0.20.2 // indirect
github.com/go-openapi/swag v0.22.4 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/google/gnostic-models v0.6.8 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/imdario/mergo v0.3.6 // indirect
github.com/json-iterator/go v1.1.6-0.20180914014843-2433035e5132 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.1 // indirect
github.com/peterbourgon/diskv v2.0.2-0.20180312054125-0646ccaebea1+incompatible // indirect
github.com/spf13/pflag v1.0.3 // indirect
github.com/stretchr/testify v1.5.1 // indirect
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2 // indirect
golang.org/x/net v0.0.0-20190603091049-60506f45cf65 // indirect
golang.org/x/oauth2 v0.0.0-20160902055913-3c3a985cb79f // indirect
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a // indirect
golang.org/x/text v0.3.2 // indirect
golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2 // indirect
google.golang.org/appengine v1.6.6 // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/x448/float16 v0.8.4 // indirect
golang.org/x/net v0.26.0 // indirect
golang.org/x/oauth2 v0.21.0 // indirect
golang.org/x/sys v0.21.0 // indirect
golang.org/x/term v0.21.0 // indirect
golang.org/x/text v0.16.0 // indirect
golang.org/x/time v0.3.0 // indirect
google.golang.org/protobuf v1.34.2 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v2 v2.2.2 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/klog/v2 v2.130.1 // indirect
k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 // indirect
k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
sigs.k8s.io/yaml v1.4.0 // indirect
)
Loading

0 comments on commit a3cb332

Please sign in to comment.