Skip to content

Commit

Permalink
Merge pull request #1278 from isucon/bench/rename-envvar
Browse files Browse the repository at this point in the history
fix(bench) supervisor から渡ってくる変数名の更新 #1172
  • Loading branch information
ShotaKitazawa authored Aug 17, 2021
2 parents 6ac76ad + 2043617 commit a826652
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
7 changes: 3 additions & 4 deletions bench/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"github.com/isucon/isucandar/score"
"github.com/pkg/profile"

// TODO: isucon11-portal に差し替え
// TODO: isucon11-portal に差し替える (isucon/isucon11-portal#167)
"github.com/isucon/isucon10-portal/bench-tool.go/benchrun"
isuxportalResources "github.com/isucon/isucon10-portal/proto.go/isuxportal/resources"

Expand Down Expand Up @@ -61,7 +61,6 @@ var (
showVersion bool

initializeTimeout time.Duration
// TODO: isucon11-portal に差し替え
reporter benchrun.Reporter
)

Expand Down Expand Up @@ -91,8 +90,8 @@ func init() {
var targetableAddressesStr string

flag.StringVar(&targetAddress, "target", benchrun.GetTargetAddress(), "ex: localhost:9292")
// TODO: 環境変数名を portal チームから共有されたものに差し替える
flag.StringVar(&targetableAddressesStr, "targetable-addresses", getEnv("ISUXBENCH_TARGETABLE_ADDRESSES", ""), `ex: "192.168.0.1 192.168.0.2 192.168.0.3" (space separated, limit 3)`)
// TODO: benchrun.GetAllAddresses で環境変数を読み込む (isucon/isucon11-portal#167)
flag.StringVar(&targetableAddressesStr, "all-addresses", getEnv("ISUXBENCH_ALL_ADDRESSES", ""), `ex: "192.168.0.1 192.168.0.2 192.168.0.3" (space separated, limit 3)`)
flag.StringVar(&profileFile, "profile", "", "ex: cpu.out")
flag.StringVar(&memProfileDir, "mem-profile", "", "path of output heap profile at max memStats.sys allocated. ex: memprof")
flag.BoolVar(&exitStatusOnFail, "exit-status", false, "set exit status non-zero when a benchmark result is failing")
Expand Down
2 changes: 1 addition & 1 deletion development/docker-compose-bench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ services:
dockerfile: development/apitest/dev.dockerfile
environment:
ISUXBENCH_TARGET: backend:3000
ISUXBENCH_TARGETABLE_ADDRESSES: backend
ISUXBENCH_ALL_ADDRESSES: backend
working_dir: /bench_dir
entrypoint: bash
tty: true
Expand Down
2 changes: 1 addition & 1 deletion development/docker-compose-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ services:
dockerfile: development/apitest/ci.dockerfile
environment:
ISUXBENCH_TARGET: backend:3000
ISUXBENCH_TARGETABLE_ADDRESSES: backend
ISUXBENCH_ALL_ADDRESSES: backend
entrypoint: dockerize -wait http://backend:3000 -timeout 60s
command: ["/bench", "--no-load", "--exit-status"]
volumes:
Expand Down

0 comments on commit a826652

Please sign in to comment.