fixed a blunder
This commit is contained in:
parent
557700d2da
commit
3b9ccf5c2e
1 changed files with 3 additions and 3 deletions
6
main.py
6
main.py
|
@ -47,7 +47,7 @@ def format_for_influx(cliout):
|
||||||
'time': data['timestamp'],
|
'time': data['timestamp'],
|
||||||
'fields': {
|
'fields': {
|
||||||
# Byte to Megabit
|
# Byte to Megabit
|
||||||
'bandwidth': data['download']['bandwidth'], #/125000
|
'bandwidth': data['download']['bandwidth'] / 125000,
|
||||||
'bytes': data['download']['bytes'],
|
'bytes': data['download']['bytes'],
|
||||||
'elapsed': data['download']['elapsed']
|
'elapsed': data['download']['elapsed']
|
||||||
}
|
}
|
||||||
|
@ -57,7 +57,7 @@ def format_for_influx(cliout):
|
||||||
'time': data['timestamp'],
|
'time': data['timestamp'],
|
||||||
'fields': {
|
'fields': {
|
||||||
# Byte to Megabit
|
# Byte to Megabit
|
||||||
'bandwidth': data['upload']['bandwidth'], #/125000
|
'bandwidth': data['upload']['bandwidth'] / 125000,
|
||||||
'bytes': data['upload']['bytes'],
|
'bytes': data['upload']['bytes'],
|
||||||
'elapsed': data['upload']['elapsed']
|
'elapsed': data['upload']['elapsed']
|
||||||
}
|
}
|
||||||
|
@ -93,7 +93,7 @@ def main():
|
||||||
print(speedtest.stdout)
|
print(speedtest.stdout)
|
||||||
time.sleep(TEST_FAIL_INTERVAL)
|
time.sleep(TEST_FAIL_INTERVAL)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
print('Speedtest CLI Data Logger to InfluxDB')
|
print('Speedtest CLI Data Logger to InfluxDB')
|
||||||
main()
|
main()
|
Loading…
Reference in a new issue