Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang
erlang
4145-megaco-Types-and-spec-for-megaco-reset_sta...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 4145-megaco-Types-and-spec-for-megaco-reset_stats-0-1.patch of Package erlang
From 19bd57fa7d078ee6559ea8a2f37a3dcdb8534220 Mon Sep 17 00:00:00 2001 From: Micael Karlberg <bmk@erlang.org> Date: Thu, 4 Jan 2024 11:18:49 +0100 Subject: [PATCH 25/46] [megaco] Types and spec for megaco:reset_stats/0,1 OTP-18920 --- lib/megaco/doc/src/megaco.xml | 26 ++++++++++++++++++++------ lib/megaco/src/app/megaco.erl | 12 ++++++++++-- 2 files changed, 30 insertions(+), 8 deletions(-) diff --git a/lib/megaco/doc/src/megaco.xml b/lib/megaco/doc/src/megaco.xml index be23d44619..46922a91f8 100644 --- a/lib/megaco/doc/src/megaco.xml +++ b/lib/megaco/doc/src/megaco.xml @@ -2439,14 +2439,28 @@ megaco_incr_timer() = #megaco_incr_timer{} </func> <func> - <name since="">reset_stats() -> void()</name> - <name since="">reset_stats(ConnHandle) -> void()</name> + <name name="reset_stats" arity="0" clause_i="1" since=""/> + <fsummary></fsummary> + <desc> + <p>Reset all (SNMP) statistics counters.</p> + <marker id="test_request"></marker> + </desc> + </func> + + <func> + <name name="reset_stats" arity="1" clause_i="1" since=""/> + <fsummary></fsummary> + <desc> + <p>Reset the specified (SNMP) statistics counter.</p> + <marker id="test_request"></marker> + </desc> + </func> + + <func> + <name name="reset_stats" arity="1" clause_i="2" since=""/> <fsummary></fsummary> - <type> - <v>ConnHandle = conn_handle()</v> - </type> <desc> - <p>Reset all related (SNMP) statistics counters.</p> + <p>Reset all (SNMP) statistics counters for a connection.</p> <marker id="test_request"></marker> </desc> </func> diff --git a/lib/megaco/src/app/megaco.erl b/lib/megaco/src/app/megaco.erl index df187f8bda..936cb753b7 100644 --- a/lib/megaco/src/app/megaco.erl +++ b/lib/megaco/src/app/megaco.erl @@ -580,11 +580,19 @@ get_stats(ConnHandle, Counter) -> %% Func: reset_stats/0, reaet_stats/1 %% Description: Reset statistics (counters) for TCP %%----------------------------------------------------------------- + +-spec reset_stats() -> void(). + reset_stats() -> megaco_messenger:reset_stats(). -reset_stats(SendHandle) -> - megaco_messenger:reset_stats(SendHandle). +-spec reset_stats(GCounter) -> void() when + GCounter :: global_counter(); + (ConnHandle) -> void() when + ConnHandle :: conn_handle(). + +reset_stats(ConnHandleOrGCounter) -> + megaco_messenger:reset_stats(ConnHandleOrGCounter). %%----------------------------------------------------------------- -- 2.35.3
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor