initial commit
This commit is contained in:
commit
0e6be50e37
23 changed files with 1069 additions and 0 deletions
26
wrk.go
Normal file
26
wrk.go
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
"os"
|
||||
"os/signal"
|
||||
"syscall"
|
||||
"time"
|
||||
)
|
||||
|
||||
func get() {
|
||||
for {
|
||||
http.Get("http://127.0.0.1:8001/srv")
|
||||
time.Sleep(time.Millisecond * 10)
|
||||
}
|
||||
}
|
||||
|
||||
func main() {
|
||||
t := 4
|
||||
for i := 0; i < t; i++ {
|
||||
go get()
|
||||
}
|
||||
sigs := make(chan os.Signal)
|
||||
signal.Notify(sigs, syscall.SIGINT, syscall.SIGTERM)
|
||||
<-sigs
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue