Developing lightweight computation at the DSG edge

Commit 534a8f1c authored by Roger Pueyo Centelles's avatar Roger Pueyo Centelles
Browse files

[monitor-ping] Save ping measurements to AntidoteDB

Signed-off-by: Roger Pueyo Centelles's avatarRoger Pueyo Centelles <>
parent 2cf114f9
......@@ -235,7 +235,10 @@ func maxTTL(ttls []int) int {
func saveMeasurement(DeviceID int, rtts []time.Duration, ttl int) {
goclidote.AntidoteAddItemToSetInMapInBucket("a", "b", "c", "d", dbHost, dbPort)
var pingTime = time.Now().UTC().Format("2006-01-02-15-04-05")
for _, v := range rtts {
fmt.Println(goclidote.AntidoteAddItemToSetInMapInBucket(fmt.Sprintf("device-%d", DeviceID), "rawping", pingTime, fmt.Sprintf("%s", v), 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