mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Refactor stat for frames
This commit is contained in:
parent
7574dbefb1
commit
ba3d293bfd
2 changed files with 41 additions and 41 deletions
|
@ -1622,12 +1622,12 @@ srs_error_t SrsGoApiPerf::serve_http(ISrsHttpResponseWriter* w, ISrsHttpMessage*
|
|||
data->set("query", p);
|
||||
|
||||
p->set("target", SrsJsonAny::str(target.c_str()));
|
||||
p->set("help", SrsJsonAny::str("?target=writev|sendmmsg|gso"));
|
||||
p->set("help", SrsJsonAny::str("?target=frames|sendmmsg|gso"));
|
||||
}
|
||||
|
||||
if (target.empty() || target == "writev") {
|
||||
if (target.empty() || target == "frames") {
|
||||
SrsJsonObject* p = SrsJsonAny::object();
|
||||
data->set("writev", p);
|
||||
data->set("frames", p);
|
||||
if ((err = stat->dumps_perf_writev(p)) != srs_success) {
|
||||
int code = srs_error_code(err); srs_error_reset(err);
|
||||
return srs_api_response_code(w, r, code);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue