et-go 20240919重建
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.
 
 

21 lines
456 B

package et_prometheus_exporter
import (
"fmt"
"log"
"testing"
"time"
)
func TestApi(t *testing.T) {
apiRun()
log.Print("=====prometheus apiRun=======")
}
func doSomethings() {
deviceId := fmt.Sprintf("deviceId-%d", time.Now().Unix())
thingId := "11111-1111"
collectTime := time.Now().Unix()
devLastDataTimeGauge.WithLabelValues(deviceId, thingId).Set(float64(collectTime))
devDataCounter.WithLabelValues(deviceId, thingId, timeStart).Inc()
}