File: graphite_test.go

package info (click to toggle)
golang-github-spacejam-loghisto 0.0~git20150819.0.3233097-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 120 kB
  • ctags: 76
  • sloc: makefile: 4
file content (23 lines) | stat: -rw-r--r-- 404 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package loghisto

import (
	"testing"
	"time"
)

func TestGraphite(t *testing.T) {
	ms := NewMetricSystem(time.Second, true)
	s := NewSubmitter(ms, GraphiteProtocol, "tcp", "localhost:7777")
	s.Start()

	metrics := &ProcessedMetricSet{
		Time: time.Now(),
		Metrics: map[string]float64{
			"test.3": 50.54,
			"test.4": 10.21,
		},
	}
	request := s.serializer(metrics)
	s.submit(request)
	s.Shutdown()
}