mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Update server stat for fast-id search
This commit is contained in:
parent
af499094f8
commit
cbfec753f0
2 changed files with 6 additions and 2 deletions
|
@ -38,6 +38,7 @@ using namespace std;
|
|||
|
||||
#include <srs_protocol_kbps.hpp>
|
||||
|
||||
SrsPps* _srs_pps_ids = new SrsPps(_srs_clock);
|
||||
SrsPps* _srs_pps_fids = new SrsPps(_srs_clock);
|
||||
SrsPps* _srs_pps_fids_level0 = new SrsPps(_srs_clock);
|
||||
|
||||
|
@ -187,6 +188,7 @@ ISrsResource* SrsResourceManager::at(int index)
|
|||
|
||||
ISrsResource* SrsResourceManager::find_by_id(std::string id)
|
||||
{
|
||||
++_srs_pps_ids->sugar;
|
||||
map<string, ISrsResource*>::iterator it = conns_id_.find(id);
|
||||
return (it != conns_id_.end())? it->second : NULL;
|
||||
}
|
||||
|
@ -206,6 +208,7 @@ ISrsResource* SrsResourceManager::find_by_fast_id(uint64_t id)
|
|||
|
||||
ISrsResource* SrsResourceManager::find_by_name(std::string name)
|
||||
{
|
||||
++_srs_pps_ids->sugar;
|
||||
map<string, ISrsResource*>::iterator it = conns_name_.find(name);
|
||||
return (it != conns_name_.end())? it->second : NULL;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue