Developing lightweight computation at the DSG edge

Commit f6fdab11 authored by Roger Pueyo Centelles's avatar Roger Pueyo Centelles
Browse files

[monitor-ping] Write whole ping arrays, not item by item

Signed-off-by: Roger Pueyo Centelles's avatarRoger Pueyo Centelles <>
parent 65de8d6c
......@@ -236,9 +236,13 @@ func maxTTL(ttls []int) int {
func saveMeasurement(DeviceID int, rtts []time.Duration, ttl int) {
var pingTime = time.Now().UTC().Format("2006-01-02-15-04-05")
var srtts []string
for _, v := range rtts {
fmt.Println(goclidote.AntidoteAddItemToSetInMapInBucket(fmt.Sprintf("device-%d", DeviceID), "rawping", pingTime, fmt.Sprintf("%s", v), dbHost, dbPort))
srtts = append(srtts, string(v))
fmt.Println(goclidote.AntidoteAddArrayToSetInMapInBucket(fmt.Sprintf("device-%d", DeviceID), "rawping", pingTime, srtts, dbHost, dbPort))
func errCheck(e error, level int, message string) {
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment