mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
SquashSRS4: Remove object cache and stat api
This commit is contained in:
parent
f711eb79ed
commit
6a980683f7
44 changed files with 141 additions and 1277 deletions
|
@ -124,28 +124,7 @@ public:
|
|||
virtual srs_error_t dumps(SrsJsonObject* obj);
|
||||
};
|
||||
|
||||
class SrsStatisticCategory
|
||||
{
|
||||
public:
|
||||
uint64_t nn;
|
||||
public:
|
||||
uint64_t a;
|
||||
uint64_t b;
|
||||
uint64_t c;
|
||||
uint64_t d;
|
||||
uint64_t e;
|
||||
public:
|
||||
uint64_t f;
|
||||
uint64_t g;
|
||||
uint64_t h;
|
||||
uint64_t i;
|
||||
uint64_t j;
|
||||
public:
|
||||
SrsStatisticCategory();
|
||||
virtual ~SrsStatisticCategory();
|
||||
};
|
||||
|
||||
class SrsStatistic : public ISrsProtocolPerf
|
||||
class SrsStatistic
|
||||
{
|
||||
private:
|
||||
static SrsStatistic *_instance;
|
||||
|
@ -169,12 +148,6 @@ private:
|
|||
// The server total kbps.
|
||||
SrsKbps* kbps;
|
||||
SrsWallClock* clk;
|
||||
// The perf stat for mw(merged write).
|
||||
SrsStatisticCategory* perf_iovs;
|
||||
SrsStatisticCategory* perf_msgs;
|
||||
SrsStatisticCategory* perf_rtp;
|
||||
SrsStatisticCategory* perf_rtc;
|
||||
SrsStatisticCategory* perf_bytes;
|
||||
private:
|
||||
SrsStatistic();
|
||||
virtual ~SrsStatistic();
|
||||
|
@ -231,35 +204,6 @@ public:
|
|||
// @param start the start index, from 0.
|
||||
// @param count the max count of clients to dump.
|
||||
virtual srs_error_t dumps_clients(SrsJsonArray* arr, int start, int count);
|
||||
public:
|
||||
// Stat for packets merged written, nb_msgs is the number of RTMP messages.
|
||||
// For example, publish by FFMPEG, Audio and Video frames.
|
||||
virtual void perf_on_msgs(int nb_msgs);
|
||||
virtual srs_error_t dumps_perf_msgs(SrsJsonObject* obj);
|
||||
public:
|
||||
// Stat for packets merged written, nb_packets is the number of RTC packets.
|
||||
// For example, a RTMP/AAC audio packet maybe transcoded to two RTC/opus packets.
|
||||
virtual void perf_on_rtc_packets(int nb_packets);
|
||||
virtual srs_error_t dumps_perf_rtc_packets(SrsJsonObject* obj);
|
||||
public:
|
||||
// Stat for packets merged written, nb_packets is the number of RTP packets.
|
||||
// For example, a RTC/opus packet maybe package to three RTP packets.
|
||||
virtual void perf_on_rtp_packets(int nb_packets);
|
||||
virtual srs_error_t dumps_perf_rtp_packets(SrsJsonObject* obj);
|
||||
public:
|
||||
// Stat for TCP writev, nb_iovs is the total number of iovec.
|
||||
virtual void perf_on_writev_iovs(int nb_iovs);
|
||||
virtual srs_error_t dumps_perf_writev_iovs(SrsJsonObject* obj);
|
||||
public:
|
||||
// Stat for bytes, nn_bytes is the size of bytes, nb_padding is padding bytes.
|
||||
virtual void perf_on_rtc_bytes(int nn_bytes, int nn_rtp_bytes, int nn_padding);
|
||||
virtual srs_error_t dumps_perf_bytes(SrsJsonObject* obj);
|
||||
public:
|
||||
// Reset all perf stat data.
|
||||
virtual void reset_perf();
|
||||
private:
|
||||
virtual void perf_on_packets(SrsStatisticCategory* p, int nb_msgs);
|
||||
virtual srs_error_t dumps_perf(SrsStatisticCategory* p, SrsJsonObject* obj);
|
||||
private:
|
||||
virtual SrsStatisticVhost* create_vhost(SrsRequest* req);
|
||||
virtual SrsStatisticStream* create_stream(SrsStatisticVhost* vhost, SrsRequest* req);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue