Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Tor
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
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
Show more breadcrumbs
orbea
Tor
Commits
6e140c53
An error occurred while fetching merge requests data.
Commit
6e140c53
authored
3 years ago
by
Nick Mathewson
Browse files
Options
Downloads
Patches
Plain Diff
Make client heartbeat stats tied to the heartbeat period.
Patch from cypherpunks. Closes #40330.
parent
d82970c8
Branches
Branches containing commit
Tags
Tags containing commit
Loading
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/feature/stats/geoip_stats.c
+3
-4
3 additions, 4 deletions
src/feature/stats/geoip_stats.c
with
3 additions
and
4 deletions
src/feature/stats/geoip_stats.c
+
3
−
4
View file @
6e140c53
...
...
@@ -1206,11 +1206,11 @@ format_bridge_stats_controller(time_t now)
char
*
format_client_stats_heartbeat
(
time_t
now
)
{
const
int
n_
hours
=
6
;
const
int
n_
seconds
=
get_options
()
->
HeartbeatPeriod
;
char
*
out
=
NULL
;
int
n_clients
=
0
;
clientmap_entry_t
**
ent
;
unsigned
cutoff
=
(
unsigned
)(
(
now
-
n_
hours
*
3600
)
/
60
);
unsigned
cutoff
=
(
unsigned
)(
(
now
-
n_
seconds
)
/
60
);
if
(
!
start_of_bridge_stats_interval
)
return
NULL
;
/* Not initialized. */
...
...
@@ -1226,8 +1226,7 @@ format_client_stats_heartbeat(time_t now)
}
tor_asprintf
(
&
out
,
"Heartbeat: "
"In the last %d hours, I have seen %d unique clients."
,
n_hours
,
"Since last heartbeat message, I have seen %d unique clients."
,
n_clients
);
return
out
;
...
...
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