Commit fe26d776 authored by Yann Diorcet's avatar Yann Diorcet

Improve statistics display

parent 3ad9baed
......@@ -677,7 +677,8 @@ void audio_stream_stop(AudioStream * stream)
ice_check_list_print_route(stream->ms.ice_check_list, "Audio session's route");
stream->ms.ice_check_list = NULL;
}
rtp_stats_display(rtp_session_get_stats(stream->ms.session),"Audio session's RTP statistics");
rtp_stats_display(rtp_session_get_stats(stream->ms.session),
" AUDIO SESSION'S RTP STATISTICS ");
/*dismantle the outgoing graph*/
ms_connection_helper_start(&h);
......
......@@ -386,19 +386,22 @@ void ms_filter_log_statistics(void){
MSList *sorted=NULL;
MSList *elem;
uint64_t total=1;
ms_message("Filter usage statistics:");
for(elem=stats_list;elem!=NULL;elem=elem->next){
MSFilterStats *stats=(MSFilterStats *)elem->data;
sorted=ms_list_insert_sorted(sorted,stats,(MSCompareFunc)usage_compare);
total+=stats->elapsed;
}
ms_message("Name\tCount\tTime/tick (ms)\tCPU Usage");
ms_message("===========================================================");
ms_message(" FILTER USAGE STATISTICS ");
ms_message("Name Count Time/tick (ms) CPU Usage");
ms_message("-----------------------------------------------------------");
for(elem=sorted;elem!=NULL;elem=elem->next){
MSFilterStats *stats=(MSFilterStats *)elem->data;
double percentage=100.0*((double)stats->elapsed)/(double)total;
double tpt=((double)stats->elapsed*1e-6)/((double)stats->count+1.0);
ms_message("%s %i %g %g",stats->name,stats->count,tpt,percentage);
ms_message("%-19s %-9i %-19g %-10g",stats->name,stats->count,tpt,percentage);
}
ms_message("===========================================================");
ms_list_free(sorted);
}
......@@ -549,7 +549,8 @@ video_stream_stop (VideoStream * stream)
ice_check_list_print_route(stream->ms.ice_check_list, "Video session's route");
stream->ms.ice_check_list = NULL;
}
rtp_stats_display(rtp_session_get_stats(stream->ms.session),"Video session's RTP statistics");
rtp_stats_display(rtp_session_get_stats(stream->ms.session),
" VIDEO SESSION'S RTP STATISTICS ");
if (stream->source){
MSConnectionHelper ch;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment