blockspacer / flexnet

MIT License
0 stars 0 forks source link

add remote debugger (like BRPC) #2

Open blockspacer opened 3 years ago

blockspacer commented 3 years ago

see basis/core/observable.hpp see bvar (BRPC) see cval https://github.com/blockspacer/webrtc-datachannels/blob/develop/examples/authoritativeserver/src/c_val.h

blockspacer commented 3 years ago

https://github.com/smfrpc/smf/blob/master/src/core/rpc_server.cc#L33

  namespace sm = seastar::metrics;
  metrics_.add_group(
    "smf::rpc_server",
    {
      sm::make_derive("active_connections", stats_->active_connections,
                      sm::description("Currently active connections")),
      sm::make_derive("total_connections", stats_->total_connections,
                      sm::description("Counts a total connetions")),
      sm::make_derive("incoming_bytes", stats_->in_bytes,
                      sm::description("Total bytes received of healthy "
                                      "connections - ignores bad connections")),
      sm::make_derive("outgoing_bytes", stats_->out_bytes,
                      sm::description("Total bytes sent to clients")),
      sm::make_derive("bad_requests", stats_->bad_requests,
                      sm::description("Bad requests")),
      sm::make_derive(
        "no_route_requests", stats_->no_route_requests,
        sm::description(
          "Requests made to this sersvice with correct header but no handler")),
      sm::make_derive("completed_requests", stats_->completed_requests,
                      sm::description("Correct round-trip returned responses")),
      sm::make_derive(
        "too_large_requests", stats_->too_large_requests,
        sm::description(
          "Requests made to this server larger than max allowedd (2GB)")),
      sm::make_histogram("handler_dispatch_latency",
                         sm::description("Server handler dispatch latency"),
                         [this] { return hist_->seastar_histogram_logform(); }),
    });