forked from chteufleur/go-xmpp
go fmt
This commit is contained in:
parent
001fb31173
commit
40fc5bc2ad
|
|
@ -80,15 +80,15 @@ func consumer(args []string) {
|
||||||
count := 0
|
count := 0
|
||||||
throughputCount := 0
|
throughputCount := 0
|
||||||
|
|
||||||
go func() {
|
go func() {
|
||||||
throughput := time.Tick(time.Second)
|
throughput := time.Tick(time.Second)
|
||||||
total := time.Tick(time.Second * 5)
|
total := time.Tick(time.Second * 5)
|
||||||
for {
|
for {
|
||||||
select {
|
select {
|
||||||
case <- throughput:
|
case <-throughput:
|
||||||
log.Printf("throughput: %d msgs/s\n", count - throughputCount)
|
log.Printf("throughput: %d msgs/s\n", count-throughputCount)
|
||||||
throughputCount = count
|
throughputCount = count
|
||||||
case <- total:
|
case <-total:
|
||||||
log.Printf("total: %d\n", count)
|
log.Printf("total: %d\n", count)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -96,7 +96,7 @@ func consumer(args []string) {
|
||||||
|
|
||||||
for stanza := range x.In {
|
for stanza := range x.In {
|
||||||
if _, ok := stanza.(*xmpp.Message); ok {
|
if _, ok := stanza.(*xmpp.Message); ok {
|
||||||
count ++
|
count++
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue