remove unwanted codes
parent
78cb651d93
commit
ce95c8ba67
|
@ -7,8 +7,6 @@ import (
|
||||||
"net/http"
|
"net/http"
|
||||||
)
|
)
|
||||||
|
|
||||||
import _ "net/http/pprof"
|
|
||||||
|
|
||||||
// Parts from this transporter were heavily influenced by Peter Bougon's
|
// Parts from this transporter were heavily influenced by Peter Bougon's
|
||||||
// raft implementation: https://github.com/peterbourgon/raft
|
// raft implementation: https://github.com/peterbourgon/raft
|
||||||
|
|
||||||
|
|
|
@ -4,8 +4,6 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"net"
|
"net"
|
||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
|
||||||
"runtime/pprof"
|
|
||||||
"sync"
|
"sync"
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
@ -78,10 +76,6 @@ func runTestHttpServers(t *testing.T, servers *[]*Server, transporter *HTTPTrans
|
||||||
// Wait for configuration to propagate.
|
// Wait for configuration to propagate.
|
||||||
time.Sleep(testHeartbeatTimeout * 2)
|
time.Sleep(testHeartbeatTimeout * 2)
|
||||||
|
|
||||||
f, _ := os.Create("raftprof")
|
|
||||||
|
|
||||||
pprof.StartCPUProfile(f)
|
|
||||||
|
|
||||||
c := make(chan bool)
|
c := make(chan bool)
|
||||||
start := time.Now()
|
start := time.Now()
|
||||||
|
|
||||||
|
@ -94,7 +88,6 @@ func runTestHttpServers(t *testing.T, servers *[]*Server, transporter *HTTPTrans
|
||||||
}
|
}
|
||||||
end := time.Now()
|
end := time.Now()
|
||||||
fmt.Println(end.Sub(start), "commands ", 1000*20)
|
fmt.Println(end.Sub(start), "commands ", 1000*20)
|
||||||
pprof.StopCPUProfile()
|
|
||||||
|
|
||||||
// Wait for configuration to propagate.
|
// Wait for configuration to propagate.
|
||||||
time.Sleep(testHeartbeatTimeout * 2)
|
time.Sleep(testHeartbeatTimeout * 2)
|
||||||
|
|
Loading…
Reference in New Issue