You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

22 lines
398 B

package vmts
import (
"strings"
"testing"
)
func TestMetric(t *testing.T) {
m := NewMetric("doge-usdt-swap-open")
m.AddTag("interval", "5m")
m.AddTsValue(1746720962969, 0.242)
m.AddTsValue(1746721051250, 0.252)
bytes, err := m.ToRowJson()
if err != nil {
t.Error(err)
}
raw := string(bytes)
if strings.Contains(raw, "\n") {
t.Error("raw data contains \\n symble")
}
t.Log(raw)
}