File: bandwidth_stats.py

package info (click to toggle)
python-stem 1.8.1-2.1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 8,152 kB
  • sloc: python: 33,747; java: 312; makefile: 124; sh: 14
file content (11 lines) | stat: -rw-r--r-- 300 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
import stem.descriptor.remote

bandwidth_file = stem.descriptor.remote.get_bandwidth_file().run()[0]

for fingerprint, measurement in bandwidth_file.measurements.items():
  print('Relay %s' % fingerprint)

  for attr, value in measurement.items():
    print('  %s = %s' % (attr, value))

  print('')