add uint64 support
This commit is contained in:
parent
f9ed42f0ec
commit
17dcbac9ce
|
@ -7,11 +7,15 @@ import (
|
||||||
"amuz.es/src/infra/cpu_ctrl/producer"
|
"amuz.es/src/infra/cpu_ctrl/producer"
|
||||||
"github.com/influxdata/influxdb/client/v2"
|
"github.com/influxdata/influxdb/client/v2"
|
||||||
zlog "amuz.es/src/infra/goutils/logger/zap"
|
zlog "amuz.es/src/infra/goutils/logger/zap"
|
||||||
|
influxmodels "github.com/influxdata/influxdb/models"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
"unsafe"
|
"unsafe"
|
||||||
"sync/atomic"
|
"sync/atomic"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
func init(){
|
||||||
|
influxmodels.EnableUintSupport()
|
||||||
|
}
|
||||||
type processorData struct {
|
type processorData struct {
|
||||||
Tempeture float64
|
Tempeture float64
|
||||||
FanSpeed int
|
FanSpeed int
|
||||||
|
@ -142,7 +146,6 @@ func (m *influxMetric) sendPoint(
|
||||||
if err := influxDbConn.Write(batchPoint); err != nil {
|
if err := influxDbConn.Write(batchPoint); err != nil {
|
||||||
m.logger.Warn(err)
|
m.logger.Warn(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *influxMetric) getOsMetric(points *[]*client.Point, info *producer.OSMetricInfo) {
|
func (m *influxMetric) getOsMetric(points *[]*client.Point, info *producer.OSMetricInfo) {
|
||||||
|
|
Loading…
Reference in New Issue