mirror of
https://github.com/singchia/frontier.git
synced 2025-09-26 20:31:25 +08:00
bench: add publish start bash script
This commit is contained in:
@@ -8,4 +8,7 @@ publish:
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
make clean -C publish
|
||||
make clean -C publish
|
||||
|
||||
bench:
|
||||
make bench -C publish
|
@@ -14,4 +14,7 @@ publish_edge: edge/*.go
|
||||
|
||||
publish_service: service/*.go
|
||||
CGO_ENABLED=0 GOOS=$(GOHOSTOS) GOARCH=$(GOARCH) \
|
||||
go build -trimpath -ldflags "-s -w" -o publish_service service/*.go
|
||||
go build -trimpath -ldflags "-s -w" -o publish_service service/*.go
|
||||
|
||||
bench: publish_edge publish_service
|
||||
chmod +x ./publish.sh && ./publish.sh
|
13
test/bench/publish/publish.sh
Executable file
13
test/bench/publish/publish.sh
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
|
||||
# start service
|
||||
sleep 2
|
||||
nohup ./publish_service >/dev/null 2>&1 &
|
||||
pid=$!
|
||||
|
||||
# start edge
|
||||
sleep 2
|
||||
./publish_edge
|
||||
|
||||
# kill service
|
||||
kill -9 $pid
|
Reference in New Issue
Block a user