1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

Fix build script

This commit is contained in:
winlin 2020-04-15 10:35:38 +08:00
parent c143c80fd6
commit 6e9e0d6ce3
4 changed files with 24 additions and 10 deletions

View file

@ -1615,14 +1615,22 @@ srs_error_t SrsGoApiPerf::serve_http(ISrsHttpResponseWriter* w, ISrsHttpMessage*
SrsStatistic* stat = SrsStatistic::instance();
string target = r->query_get("target");
srs_trace("query target=%s", target.c_str());
string reset = r->query_get("reset");
srs_trace("query target=%s, reset=%s", target.c_str(), reset.c_str());
if (true) {
SrsJsonObject* p = SrsJsonAny::object();
data->set("query", p);
p->set("target", SrsJsonAny::str(target.c_str()));
p->set("reset", SrsJsonAny::str(reset.c_str()));
p->set("help", SrsJsonAny::str("?target=avframes|rtc|rtp|gso|writev_iovs|sendmmsg"));
p->set("help2", SrsJsonAny::str("?reset=all"));
}
if (!reset.empty()) {
stat->reset_perf();
return srs_api_response(w, r, obj->dumps());
}
if (target.empty() || target == "avframes") {