Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
metrics-tasks
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Legacy
gitolite
metrics-tasks
Commits
770082bf
Commit
770082bf
authored
4 years ago
by
Karsten Loesing
Browse files
Options
Downloads
Patches
Plain Diff
Update criteria for partial/full IPv6 support.
parent
2cab2b49
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tpo-metrics-trac-40002/TESTS.txt
+55
-0
55 additions, 0 deletions
tpo-metrics-trac-40002/TESTS.txt
tpo-metrics-trac-40002/ipv6.py
+2
-2
2 additions, 2 deletions
tpo-metrics-trac-40002/ipv6.py
with
57 additions
and
2 deletions
tpo-metrics-trac-40002/TESTS.txt
0 → 100644
+
55
−
0
View file @
770082bf
# count relays
grep -c "^r " 2020-07-01-01-00-00-consensus
# count relays with IPv6 ORPort
grep -c "^a \[" 2020-07-01-01-00-00-consensus
# compute total consensus weight
grep "^w " 2020-07-01-01-00-00-consensus | cut -d"=" -f2 | awk '{s+=$1}END{print s}'
# compute consensus weight of relays with IPv6 ORPort
grep -A5 "^a \[" 2020-07-01-01-00-00-consensus | grep "^w " | cut -d"=" -f2 | awk '{s+=$1}END{print s}'
# count relays with IPv6 ORPort and partial IPv6 reachability checks
grep -A5 "^a \[" 2020-07-01-01-00-00-consensus | grep "^v Tor 0.4.4.[1-9]" | sort | uniq -c
# count relays with IPv6 ORPort and full IPv6 reachability checks
grep -A5 "^a \[" 2020-07-01-01-00-00-consensus | grep -B1 "^pr.* Relay=..3" | grep "^v Tor 0.4.5" | sort | uniq -c
# compute consensus weight of relays with IPv6 ORPort and partial IPv6 reachability checks
grep -A5 "^a \[" 2020-07-01-01-00-00-consensus | grep -A2 "^v Tor 0.4.4.[1-9]" | grep "^w " | cut -d"=" -f2 | awk '{s+=$1}END{print s}'
# compute consensus weight of relays with IPv6 ORPort and full IPv6 reachability checks
grep -A5 "^a \[" 2020-07-01-01-00-00-consensus | grep -C1 "^pr.* Relay=..3" | grep -A2 "^v Tor 0.4.5" | grep "^w " | cut -d"=" -f2 | awk '{s+=$1}END{print s}'
# obtain subset of usable guards
grep -v "^s.* Exit" 2020-07-01-01-00-00-consensus | grep -B2 -A4 "^s.* Guard" > 2020-07-01-01-00-00-usable-guards
grep -B2 -A4 "^s.* BadExit.* Guard" 2020-07-01-01-00-00-consensus >> 2020-07-01-01-00-00-usable-guards
# count usable guards
grep -c "^r " 2020-07-01-01-00-00-usable-guards
# find Wgd value
grep Wgd 2020-07-01-01-00-00-consensus
# count usable guards with IPv6 ORPort
grep -c "^a \[" 2020-07-01-01-00-00-usable-guards
# compute usable guards consensus weight
grep "^w " 2020-07-01-01-00-00-usable-guards | cut -d"=" -f2 | awk '{s+=$1}END{print s}'
# compute consensus weight of usable guards with IPv6 ORPort
grep -A5 "^a \[" 2020-07-01-01-00-00-usable-guards | grep "^w " | cut -d"=" -f2 | awk '{s+=$1}END{print s}'
# count usable guards with IPv6 ORPort and partial IPv6 reachability checks
grep -A5 "^a \[" 2020-07-01-01-00-00-usable-guards | grep "^v Tor 0.4.4.[1-9]" | sort | uniq -c
# count usable guards with IPv6 ORPort and full IPv6 reachability checks
grep -A5 "^a \[" 2020-07-01-01-00-00-usable-guards | grep -C1 "^pr.* Relay=..3" | grep "^v Tor 0.4.5" | sort | uniq -c
# compute consensus weight of usable guards with IPv6 ORPort and partial IPv6 reachability checks
grep -A5 "^a \[" 2020-07-01-01-00-00-usable-guards | grep -A2 "^v Tor 0.4.4.[1-9]" | grep "^w " | cut -d"=" -f2 | awk '{s+=$1}END{print s}'
# compute consensus weight of usable guards with IPv6 ORPort and full IPv6 reachability checks
grep -A5 "^a \[" 2020-07-01-01-00-00-usable-guards | grep -C1 "^pr.* Relay=..3" | grep -A2 "^v Tor 0.4.5" | grep "^w " | cut -d"=" -f2 | awk '{s+=$1}END{print s}'
This diff is collapsed.
Click to expand it.
tpo-metrics-trac-40002/ipv6.py
+
2
−
2
View file @
770082bf
...
@@ -78,7 +78,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
...
@@ -78,7 +78,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import
sys
,
stem
,
stem
.
version
,
stem
.
descriptor
import
sys
,
stem
,
stem
.
version
,
stem
.
descriptor
partial_support_version
=
stem
.
version
.
Version
(
'
0.4.4
'
)
partial_support_version
=
stem
.
version
.
Version
(
'
0.4.4
.1
'
)
full_support_version
=
stem
.
version
.
Version
(
'
0.4.5
'
)
full_support_version
=
stem
.
version
.
Version
(
'
0.4.5
'
)
def
read
(
consensus_filename
):
def
read
(
consensus_filename
):
...
@@ -120,7 +120,7 @@ def read(consensus_filename):
...
@@ -120,7 +120,7 @@ def read(consensus_filename):
has_partial_support
=
False
has_partial_support
=
False
has_full_support
=
False
has_full_support
=
False
if
relay
.
version
:
if
relay
.
version
:
if
relay
.
version
>=
full_support_version
:
if
"
Relay
"
in
relay
.
protocols
and
3
in
relay
.
protocols
[
"
Relay
"
]
and
relay
.
version
>=
full_support_version
:
has_full_support
=
True
has_full_support
=
True
if
relay
.
version
>=
partial_support_version
:
if
relay
.
version
>=
partial_support_version
:
has_partial_support
=
True
has_partial_support
=
True
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment