Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Collector
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
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
Show more breadcrumbs
The Tor Project
Network Health
Metrics
Collector
Commits
b010cc8a
Commit
b010cc8a
authored
5 months ago
by
Hiro
Browse files
Options
Downloads
Patches
Plain Diff
Fix checks
parent
dd2de60a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!9
Optimize function that is causing OOM errors
Pipeline
#211376
passed
5 months ago
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/org/torproject/metrics/collector/relaydescs/ReferenceChecker.java
+4
-2
4 additions, 2 deletions
...roject/metrics/collector/relaydescs/ReferenceChecker.java
with
4 additions
and
2 deletions
src/main/java/org/torproject/metrics/collector/relaydescs/ReferenceChecker.java
+
4
−
2
View file @
b010cc8a
...
...
@@ -302,7 +302,8 @@ public class ReferenceChecker {
// Second pass: check for missing descriptors
for
(
Reference
reference
:
this
.
references
)
{
if
(
reference
.
referenced
.
length
()
>
0
&&
!
knownDescriptors
.
contains
(
reference
.
referenced
))
{
if
(
reference
.
referenced
.
length
()
>
0
&&
!
knownDescriptors
.
contains
(
reference
.
referenced
))
{
totalMissingDescriptorsWeight
+=
reference
.
weight
;
sb
.
append
(
String
.
format
(
"%n%s -> %s (%.4f -> %.4f)"
,
reference
.
referencing
,
reference
.
referenced
,
reference
.
weight
,
...
...
@@ -315,7 +316,8 @@ public class ReferenceChecker {
// Warn if the total missing descriptors weight exceeds the threshold
if
(
totalMissingDescriptorsWeight
>
0.999
)
{
logger
.
warn
(
"Missing too many referenced descriptors ({})."
,
totalMissingDescriptorsWeight
);
logger
.
warn
(
"Missing too many referenced descriptors ({})."
,
totalMissingDescriptorsWeight
);
}
}
...
...
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