From 781f1ed0ff08731c9f7c5e88bc07b74faa443050 Mon Sep 17 00:00:00 2001 From: Daniel Langesten Date: Wed, 18 Mar 2015 03:39:46 +0100 Subject: removed volume since it can be configured in pmacct --- cleaner_test.go | 12 ------------ config.go | 13 +++---------- config.json | 19 +------------------ 3 files changed, 4 insertions(+), 40 deletions(-) diff --git a/cleaner_test.go b/cleaner_test.go index d1eb870..b4028a3 100644 --- a/cleaner_test.go +++ b/cleaner_test.go @@ -33,18 +33,6 @@ func TestDataFetching(t *testing.T) { func TestCleaning(t *testing.T) { conf := Config{ - Volumes: []VolumeInfo{ - VolumeInfo{ - Size: "small", - Lower: 0, - Upper: 100, - }, - VolumeInfo{ - Size: "medium", - Lower: 100, - Upper: 0, - }, - }, Interval: "10min", Epsilon: 0, } diff --git a/config.go b/config.go index 31a98d2..fd80d87 100644 --- a/config.go +++ b/config.go @@ -7,16 +7,9 @@ import ( ) type Config struct { - Volumes []VolumeInfo `json:volumes` - Limit int `json:limit` - Interval string `json:interval` - Epsilon float64 `json:epsilon` -} - -type VolumeInfo struct { - Size string `json:size` - Lower int `json:lower` - Upper int `json:upper` + Limit int `json:limit` + Interval string `json:interval` + Epsilon float64 `json:epsilon` } func readConfig() (conf Config, err error) { diff --git a/config.json b/config.json index 2742756..ebb9f81 100644 --- a/config.json +++ b/config.json @@ -6,22 +6,5 @@ "limit": 100, "comment Epsilon": "Epsilon is the epsilon value for differential privacy. epsilon < 1 high privacy, 10 < epsilon low privacy. If epsilon is set to 0, differential privacy will not be used.", - "epsilon": 0, - - "comment Volumes": "The volumes that a packet size can fall into. size is the label given to the volume. The interval of the volumes is [lower,upper).", - "volumes": [ - { - "size": "small", - "upper": 100 - }, - { - "size": "medium", - "lower": 100, - "upper": 200 - }, - { - "size": "large", - "lower": 200 - } - ] + "epsilon": 0 } -- cgit v1.1