diff options
author | Christian Pointner <equinox@spreadspace.org> | 2014-10-14 01:48:42 +0200 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2014-10-14 01:48:42 +0200 |
commit | 7909b25b4c62968e61323114e792c0ad60f9b6dc (patch) | |
tree | ce1f61ac6f0ac6e0a46f7b54fc8e0d31d040b271 /src/daq/accesslog | |
parent | moved client hash to own class (diff) |
sendData now uses new ClientList directly
Diffstat (limited to 'src/daq/accesslog')
-rwxr-xr-x | src/daq/accesslog/sfive-accesslog.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/daq/accesslog/sfive-accesslog.py b/src/daq/accesslog/sfive-accesslog.py index 1914820..89e2c1b 100755 --- a/src/daq/accesslog/sfive-accesslog.py +++ b/src/daq/accesslog/sfive-accesslog.py @@ -256,7 +256,7 @@ class AccessLog(): clients.update(linedata) else: while linedata['ts'] > nextts: - self._sendDataset(nextts, self._duration, clients.getCnt(), clients.getBytesSent()) + self._sendDataset(nextts, self._duration, clients) cnt += 1 lastts = nextts nextts = lastts + datetime.timedelta(seconds=self._duration) @@ -266,7 +266,7 @@ class AccessLog(): # send remaining data if nextts: - self._sendDataset(nextts, self._duration, clients.getCnt(), clients.getBytesSent()) + self._sendDataset(nextts, self._duration, clients) cnt += 1 except re.error as e: @@ -274,12 +274,12 @@ class AccessLog(): return cnt - def _sendDataset(self, timestamp, duration, client_count, bytes_sent): + def _sendDataset(self, timestamp, duration, clients): data = { "start-time": timestamp.isoformat('T'), "duration-ms": duration * 1000, "data": { - "client-count": client_count, - "bytes-sent": bytes_sent + "client-count": clients.getCnt(), + "bytes-sent": clients.getBytesSent() } } self._proto.sendDatagram('%s\n' % (json.dumps(data))); |