diff options
author | Daniel Langesten <daniel.langest@gmail.com> | 2015-03-18 03:39:46 +0100 |
---|---|---|
committer | Daniel Langesten <daniel.langest@gmail.com> | 2015-03-18 03:39:46 +0100 |
commit | 781f1ed0ff08731c9f7c5e88bc07b74faa443050 (patch) | |
tree | eb432fa0755a474a10e1d0839f02413ad5a8413f | |
parent | fee0e9b89dc6e1b417a88f955029cacf47d86934 (diff) |
removed volume since it can be configured in pmacct
-rw-r--r-- | cleaner_test.go | 12 | ||||
-rw-r--r-- | config.go | 13 | ||||
-rw-r--r-- | 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, } @@ -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 } |