Holds information about successful, failed, forwarded, etc. RPC handler calls.
More...
#include <Counters.hpp>
|
| Counters (WorkQueue const &wq) |
| Creates a new counters instance that operates on the given WorkQueue.
|
|
void | rpcFailed (std::string const &method) |
| Increments the failed count for a particular RPC method.
|
|
void | rpcErrored (std::string const &method) |
| Increments the errored count for a particular RPC method.
|
|
void | rpcComplete (std::string const &method, std::chrono::microseconds const &rpcDuration) |
| Increments the completed count for a particular RPC method.
|
|
void | rpcForwarded (std::string const &method) |
| Increments the forwarded count for a particular RPC method.
|
|
void | rpcFailedToForward (std::string const &method) |
| Increments the failed to forward count for a particular RPC method.
|
|
void | onTooBusy () |
| Increments the global too busy counter.
|
|
void | onNotReady () |
| Increments the global not ready counter.
|
|
void | onBadSyntax () |
| Increments the global bad syntax counter.
|
|
void | onUnknownCommand () |
| Increments the global unknown command/method counter.
|
|
void | onInternalError () |
| Increments the global internal error counter.
|
|
std::chrono::seconds | uptime () const |
|
boost::json::object | report () const |
|
Holds information about successful, failed, forwarded, etc. RPC handler calls.
◆ Counters()
rpc::Counters::Counters |
( |
WorkQueue const & | wq | ) |
|
Creates a new counters instance that operates on the given WorkQueue.
- Parameters
-
wq | The work queue to operate on |
◆ makeCounters()
A factory function that creates a new counters instance.
- Parameters
-
wq | The work queue to operate on |
- Returns
- The new instance
◆ report()
boost::json::object rpc::Counters::report |
( |
| ) |
const |
- Returns
- A JSON report with current state of all counters for every method.
◆ rpcComplete()
void rpc::Counters::rpcComplete |
( |
std::string const & | method, |
|
|
std::chrono::microseconds const & | rpcDuration ) |
Increments the completed count for a particular RPC method.
- Parameters
-
method | The method to increment the count for |
rpcDuration | The duration of the RPC call |
◆ rpcErrored()
void rpc::Counters::rpcErrored |
( |
std::string const & | method | ) |
|
Increments the errored count for a particular RPC method.
- Parameters
-
method | The method to increment the count for |
◆ rpcFailed()
void rpc::Counters::rpcFailed |
( |
std::string const & | method | ) |
|
Increments the failed count for a particular RPC method.
- Parameters
-
method | The method to increment the count for |
◆ rpcFailedToForward()
void rpc::Counters::rpcFailedToForward |
( |
std::string const & | method | ) |
|
Increments the failed to forward count for a particular RPC method.
- Parameters
-
method | The method to increment the count for |
◆ rpcForwarded()
void rpc::Counters::rpcForwarded |
( |
std::string const & | method | ) |
|
Increments the forwarded count for a particular RPC method.
- Parameters
-
method | The method to increment the count for |
◆ uptime()
std::chrono::seconds rpc::Counters::uptime |
( |
| ) |
const |
- Returns
- Uptime of this instance in seconds.
The documentation for this class was generated from the following files:
- /__w/clio/clio/src/rpc/Counters.hpp
- /__w/clio/clio/src/rpc/Counters.cpp