Cecylia Bocovich
0767a637c1
Changed variable names/types to be more reasonable
...
Also moved the geoip check to occur after we've make sure the proxy IP
hasn't yet been recorded. This is will cut down on unecessary
computation.
2019-06-14 17:00:31 -04:00
Cecylia Bocovich
92d61f2555
Added a comment for the metrics specification
2019-06-12 10:17:55 -04:00
Cecylia Bocovich
fe3356a54d
Unit tests for metrics code
...
Added unit tests for metrics logging. Refactored the logMetrics()
function to allow for easier testing
2019-06-12 10:14:21 -04:00
Cecylia Bocovich
25f059f4c4
Log geoip stats of proxies by unique IP
...
Change it so that we log the geoip country code of proxies if they poll
within the current metrics epoch. We make sure we log by unique IP
address
2019-06-11 15:43:59 -04:00
Cecylia Bocovich
c782ebdcea
Format output to meet specification
...
Output is now printed out in Tor Directory Protocol Format, as specified
in https://trac.torproject.org/projects/tor/ticket/21315#comment:19 .
2019-06-11 15:01:05 -04:00
Cecylia Bocovich
175b8efb04
Bin metrics to nearest mult of 8
2019-06-11 14:27:42 -04:00
Cecylia Bocovich
0293674e38
Zero out counts for next time step
2019-06-11 14:19:14 -04:00
Cecylia Bocovich
d57cd07599
Implemented count metrics for broker events
...
Added three new metrics:
- proxyIdleCount counts the number of times a proxy polls and receives
no snowflakes
- clientDeniedCount counts the number of times a client requested a
snowflake but none were available
- clientProxyMatchCount counts the number of times a client successfully
received a snowflake
2019-06-11 14:16:01 -04:00
Cecylia Bocovich
64ce7dff1b
Changed time resolution for metrics collection
...
Set the resolution of metrics data collection to be every 24 hours
2019-06-11 13:44:59 -04:00
Cecylia Bocovich
ba4fe1a73e
Added an option to specify metrics log file
...
Previously the metrics log file was hardcoded and the broker wasn't
behaving properly if it was unable to open the file for logging.
Added a commandline option to specify the logfile that defaults to
Stdout.
Fixed up some documentation and log output formatting
2019-05-14 12:53:01 -04:00
Cecylia Bocovich
171c55a9b1
Implemented geoip lookups for the snowflake broker. This heavily based off of how tor maps IP addresses to country codes, and relies on the provided ipv4 and ipv6 files.
2019-04-29 17:10:15 -04:00
Hooman
b7df69fa55
Make Broker run standalone
2017-06-29 13:51:55 -07:00
Serene H
47e1338290
initial client roundtrip estimate on broker
2016-09-20 06:28:11 -07:00