mirror of
https://github.com/torproject/collector.git
synced 2024-11-27 11:20:25 +00:00
Fix parsing trusted's dirreq stats.
This commit is contained in:
parent
9538ab9644
commit
e11944e003
@ -14,19 +14,18 @@ public class ExtraInfoParser {
|
||||
}
|
||||
public void parse(String dir, BufferedReader br) throws IOException {
|
||||
String line = null, date = null, v3ips = null;
|
||||
boolean skip = false;
|
||||
while ((line = br.readLine()) != null) {
|
||||
if (line.startsWith("dirreq-stats-end ")) {
|
||||
date = line.split(" ")[1];
|
||||
if (dir.equals("8522EB98C91496E80EC238E732594D1509158E77")
|
||||
&& (date.equals("2009-09-10") || date.equals("2009-09-11"))) {
|
||||
// trusted had very strange dirreq-v3-shares there...
|
||||
break;
|
||||
}
|
||||
// trusted had very strange dirreq-v3-shares here...
|
||||
skip = dir.equals("8522EB98C91496E80EC238E732594D1509158E77")
|
||||
&& (date.equals("2009-09-10") || date.equals("2009-09-11"));
|
||||
} else if (line.startsWith("dirreq-v3-reqs ")
|
||||
&& line.length() > "dirreq-v3-reqs ".length()) {
|
||||
v3ips = line.split(" ")[1];
|
||||
} else if (line.startsWith("dirreq-v3-share ")
|
||||
&& v3ips != null) {
|
||||
&& v3ips != null && !skip) {
|
||||
Map<String, String> obs = new HashMap<String, String>();
|
||||
String[] parts = v3ips.split(",");
|
||||
for (String p : parts) {
|
||||
|
Loading…
Reference in New Issue
Block a user