mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
refine the profiler
This commit is contained in:
parent
7239963780
commit
4061f0db58
1 changed files with 2 additions and 2 deletions
|
@ -24,7 +24,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
set the pprof path if not set:
|
set the pprof path if not set:
|
||||||
export PPROF_PATH=`pwd`/../../../objs/pprof
|
export PPROF_PATH=`pwd`/../../../objs/pprof
|
||||||
to do mem profile:
|
to do mem profile:
|
||||||
make && rm -f srs.*.heap && env ./heap_profiler
|
make && rm -f srs.*.heap && env HEAPPROFILE=./srs ./heap_profiler
|
||||||
$PPROF_PATH --text heap_profiler ./*.heap
|
$PPROF_PATH --text heap_profiler ./*.heap
|
||||||
*/
|
*/
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
@ -56,7 +56,7 @@ int main(int argc, char** argv) {
|
||||||
signal(SIGINT, handler);
|
signal(SIGINT, handler);
|
||||||
|
|
||||||
// must start profiler manually.
|
// must start profiler manually.
|
||||||
HeapProfilerStart("srs");
|
HeapProfilerStart(NULL);
|
||||||
|
|
||||||
memory_alloc_profile();
|
memory_alloc_profile();
|
||||||
// not neccessary to call stop.
|
// not neccessary to call stop.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue