add work queue output to server_info (#322)

This commit is contained in:
CJ Cobb
2022-09-26 14:51:39 -05:00
committed by GitHub
parent eb1ea28e27
commit 0ebe92de68
5 changed files with 19 additions and 12 deletions

View File

@@ -4,6 +4,8 @@
#include <boost/json.hpp>
#include <chrono>
#include <cstdint>
#include <functional>
#include <rpc/WorkQueue.h>
#include <shared_mutex>
#include <string>
#include <unordered_map>
@@ -30,8 +32,10 @@ private:
std::shared_mutex mutex_;
std::unordered_map<std::string, MethodInfo> methodInfo_;
std::reference_wrapper<const WorkQueue> workQueue_;
public:
Counters() = default;
Counters(WorkQueue const& wq) : workQueue_(std::cref(wq)){};
void
rpcErrored(std::string const& method);
@@ -50,4 +54,4 @@ public:
} // namespace RPC
#endif // RPC_COUNTERS_H
#endif // RPC_COUNTERS_H