Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
The Tor Project
Network Health
Metrics
Library
Commits
1e9fa021
Commit
1e9fa021
authored
May 15, 2020
by
Karsten Loesing
Browse files
Support OnionPerf results files up to version 2.x.
parent
ba6c63a7
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/main/java/org/torproject/descriptor/onionperf/OnionPerfAnalysisConverter.java
View file @
1e9fa021
...
...
@@ -109,9 +109,9 @@ public class OnionPerfAnalysisConverter {
throw
new
DescriptorParseException
(
"Parsed OnionPerf analysis file does "
+
"not contain version information."
);
}
else
if
((
parsedOnionPerfAnalysis
.
version
instanceof
Double
&&
(
double
)
parsedOnionPerfAnalysis
.
version
>
1
.999
)
&&
(
double
)
parsedOnionPerfAnalysis
.
version
>
2
.999
)
||
(
parsedOnionPerfAnalysis
.
version
instanceof
String
&&
!
((
String
)
parsedOnionPerfAnalysis
.
version
).
startsWith
(
"
1
."
)))
{
&&
((
String
)
parsedOnionPerfAnalysis
.
version
).
compareTo
(
"
3
."
)
>=
0
))
{
throw
new
DescriptorParseException
(
"Parsed OnionPerf analysis file "
+
"contains unsupported version "
+
parsedOnionPerfAnalysis
.
version
+
"."
);
...
...
src/test/resources/onionperf/onionperf.analysis.json.xz
View file @
1e9fa021
No preview for this file type
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment