Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
Actor Framework
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cpp-libs
Actor Framework
Commits
4dc03681
Commit
4dc03681
authored
Jun 17, 2020
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename getter for the metrics registry
parent
515c1459
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
10 deletions
+10
-10
libcaf_core/caf/actor_system.hpp
libcaf_core/caf/actor_system.hpp
+7
-7
libcaf_core/src/actor_registry.cpp
libcaf_core/src/actor_registry.cpp
+1
-1
libcaf_io/src/detail/prometheus_broker.cpp
libcaf_io/src/detail/prometheus_broker.cpp
+2
-2
No files found.
libcaf_core/caf/actor_system.hpp
View file @
4dc03681
...
@@ -230,14 +230,14 @@ public:
...
@@ -230,14 +230,14 @@ public:
return
assignable
(
xs
,
message_types
<
T
>
());
return
assignable
(
xs
,
message_types
<
T
>
());
}
}
/// Returns the
telemetry
registry for this system.
/// Returns the
metrics
registry for this system.
telemetry
::
metric_registry
&
telemetry
()
noexcept
{
telemetry
::
metric_registry
&
metrics
()
noexcept
{
return
telemetry
_
;
return
metrics
_
;
}
}
/// Returns the
telemetry
registry for this system.
/// Returns the
metrics
registry for this system.
const
telemetry
::
metric_registry
&
telemetry
()
const
noexcept
{
const
telemetry
::
metric_registry
&
metrics
()
const
noexcept
{
return
telemetry
_
;
return
metrics
_
;
}
}
/// Returns the host-local identifier for this system.
/// Returns the host-local identifier for this system.
...
@@ -600,7 +600,7 @@ private:
...
@@ -600,7 +600,7 @@ private:
// -- member variables -------------------------------------------------------
// -- member variables -------------------------------------------------------
/// Manages all metrics collected by the system.
/// Manages all metrics collected by the system.
telemetry
::
metric_registry
telemetry
_
;
telemetry
::
metric_registry
metrics
_
;
/// Provides system-wide callbacks for several actor operations.
/// Provides system-wide callbacks for several actor operations.
actor_profiler
*
profiler_
;
actor_profiler
*
profiler_
;
...
...
libcaf_core/src/actor_registry.cpp
View file @
4dc03681
...
@@ -49,7 +49,7 @@ actor_registry::~actor_registry() {
...
@@ -49,7 +49,7 @@ actor_registry::~actor_registry() {
}
}
actor_registry
::
actor_registry
(
actor_system
&
sys
)
:
system_
(
sys
)
{
actor_registry
::
actor_registry
(
actor_system
&
sys
)
:
system_
(
sys
)
{
running_
=
sys
.
telemetry
().
gauge_singleton
(
running_
=
sys
.
metrics
().
gauge_singleton
(
"caf"
,
"running-actors"
,
"Number of currently running actors."
);
"caf"
,
"running-actors"
,
"Number of currently running actors."
);
}
}
...
...
libcaf_io/src/detail/prometheus_broker.cpp
View file @
4dc03681
...
@@ -191,7 +191,7 @@ prometheus_broker::prometheus_broker(actor_config& cfg) : io::broker(cfg) {
...
@@ -191,7 +191,7 @@ prometheus_broker::prometheus_broker(actor_config& cfg) : io::broker(cfg) {
#ifdef HAS_PROCESS_METRICS
#ifdef HAS_PROCESS_METRICS
using
telemetry
::
dbl_gauge
;
using
telemetry
::
dbl_gauge
;
using
telemetry
::
int_gauge
;
using
telemetry
::
int_gauge
;
auto
&
reg
=
system
().
telemetry
();
auto
&
reg
=
system
().
metrics
();
cpu_time_
=
reg
.
gauge_singleton
<
double
>
(
cpu_time_
=
reg
.
gauge_singleton
<
double
>
(
"process"
,
"cpu"
,
"Total user and system CPU time spent."
,
"seconds"
,
true
);
"process"
,
"cpu"
,
"Total user and system CPU time spent."
,
"seconds"
,
true
);
mem_size_
=
reg
.
gauge_singleton
(
"process"
,
"resident_memory"
,
mem_size_
=
reg
.
gauge_singleton
(
"process"
,
"resident_memory"
,
...
@@ -249,7 +249,7 @@ behavior prometheus_broker::make_behavior() {
...
@@ -249,7 +249,7 @@ behavior prometheus_broker::make_behavior() {
// Collect metrics, ship response, and close.
// Collect metrics, ship response, and close.
scrape
();
scrape
();
auto
hdr
=
as_bytes
(
make_span
(
request_ok
));
auto
hdr
=
as_bytes
(
make_span
(
request_ok
));
auto
text
=
collector_
.
collect_from
(
system
().
telemetry
());
auto
text
=
collector_
.
collect_from
(
system
().
metrics
());
auto
payload
=
as_bytes
(
make_span
(
text
));
auto
payload
=
as_bytes
(
make_span
(
text
));
auto
&
dst
=
wr_buf
(
msg
.
handle
);
auto
&
dst
=
wr_buf
(
msg
.
handle
);
dst
.
insert
(
dst
.
end
(),
hdr
.
begin
(),
hdr
.
end
());
dst
.
insert
(
dst
.
end
(),
hdr
.
begin
(),
hdr
.
end
());
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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