collectd test client defaults to no limit points
parent
1eb0347670
commit
d2da99049a
|
@ -15,7 +15,7 @@ import (
|
||||||
var nMeasurments = flag.Int("m", 1, "Number of measurements")
|
var nMeasurments = flag.Int("m", 1, "Number of measurements")
|
||||||
var tagVariance = flag.Int("v", 1, "Number of values per tag. Client is fixed at one tag")
|
var tagVariance = flag.Int("v", 1, "Number of values per tag. Client is fixed at one tag")
|
||||||
var rate = flag.Int("r", 1, "Number of points per second")
|
var rate = flag.Int("r", 1, "Number of points per second")
|
||||||
var total = flag.Int("t", 1, "Total number of points to send")
|
var total = flag.Int("t", -1, "Total number of points to send (default is no limit)")
|
||||||
var host = flag.String("u", "127.0.0.1:25826", "Destination host in the form host:port")
|
var host = flag.String("u", "127.0.0.1:25826", "Destination host in the form host:port")
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
@ -43,7 +43,10 @@ func main() {
|
||||||
}()
|
}()
|
||||||
|
|
||||||
nSent := 0
|
nSent := 0
|
||||||
for nSent < *total {
|
for {
|
||||||
|
if nSent >= *total && *total > 0 {
|
||||||
|
break
|
||||||
|
}
|
||||||
<-rateLimiter
|
<-rateLimiter
|
||||||
|
|
||||||
vl := api.ValueList{
|
vl := api.ValueList{
|
||||||
|
|
Loading…
Reference in New Issue