mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-28 14:15:06 +03:00
Run gofmt -s -w .
This commit is contained in:
parent
ae7b07ae6a
commit
b3ebe76b59
45 changed files with 5037 additions and 4288 deletions
|
@ -4,19 +4,19 @@ import "sync"
|
|||
import "time"
|
||||
import "fmt"
|
||||
|
||||
func main () {
|
||||
const reqs = 1000000
|
||||
var wg sync.WaitGroup
|
||||
start := time.Now()
|
||||
for idx := 0 ; idx < reqs ; idx++ {
|
||||
wg.Add(1)
|
||||
go func () { wg.Done() } ()
|
||||
}
|
||||
wg.Wait()
|
||||
stop := time.Now()
|
||||
timed := stop.Sub(start)
|
||||
fmt.Printf("%d goroutines in %s (%f per second)\n",
|
||||
reqs,
|
||||
timed,
|
||||
reqs/timed.Seconds())
|
||||
func main() {
|
||||
const reqs = 1000000
|
||||
var wg sync.WaitGroup
|
||||
start := time.Now()
|
||||
for idx := 0; idx < reqs; idx++ {
|
||||
wg.Add(1)
|
||||
go func() { wg.Done() }()
|
||||
}
|
||||
wg.Wait()
|
||||
stop := time.Now()
|
||||
timed := stop.Sub(start)
|
||||
fmt.Printf("%d goroutines in %s (%f per second)\n",
|
||||
reqs,
|
||||
timed,
|
||||
reqs/timed.Seconds())
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue