Add comments and shuffle var declarations

pull/4168/head
Michael Desa 2015-09-21 16:33:26 -07:00
parent fdfb039a44
commit 03f291d78c
2 changed files with 7 additions and 3 deletions

View File

@ -29,12 +29,12 @@ func init() {
}
func main() {
runtime.GOMAXPROCS(runtime.NumCPU())
flag.Parse()
var cfg *runner.Config
var err error
runtime.GOMAXPROCS(runtime.NumCPU())
flag.Parse()
cfg = runner.NewConfig()
if len(ms) == 0 {

View File

@ -66,6 +66,8 @@ type Config struct {
Queries []query `toml:"query"`
}
// NewSeries, takes a measurement, and point count,
// and a series count and returns a series
func NewSeries(m string, p int, sc int) series {
s := series{
PointCount: p,
@ -87,6 +89,8 @@ func NewSeries(m string, p int, sc int) series {
return s
}
// NewConfig returns a pointer to a config
// with some default parameters set
func NewConfig() *Config {
w := write{