Created
November 7, 2018 10:09
-
-
Save superboum/1c4f78d3ab4426594b0618683ef11d95 to your computer and use it in GitHub Desktop.
Parse latencies of https://naviga-tor.github.io/#data
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fs = require('fs') | |
const content = fs.readFileSync('single-host_latency.json').toString('utf-8').split("\n") | |
content.pop() | |
const parsed = content.map(JSON.parse) | |
console.log("Number of RTT measured for Tor Circuit 0:", parsed[0][10].length) | |
console.log("Number of Tor Circuit created:", parsed.length) | |
const broken_from_beginning = parsed.filter(l => l[10].length == 0).length | |
const broken_en_route = parsed.filter(l => l[10].length > 0 && l[10].length < 600).length | |
console.log("Percentage of Tor Circuits that have 0 RTT measurement:", broken_from_beginning/parsed.length*100) | |
console.log("Percentage of Tor Circuits that have at least 1 RTT measurement but less than 600:",broken_en_route/parsed.length*100) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment