Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
mediastreamer2
Commits
fe26d776
Commit
fe26d776
authored
Jan 09, 2013
by
Yann Diorcet
Browse files
Improve statistics display
parent
3ad9baed
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/audiostream.c
View file @
fe26d776
...
...
@@ -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
);
...
...
src/msfilter.c
View file @
fe26d776
...
...
@@ -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
\t
Count
\t
Time/tick (ms)
\t
CPU 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
(
"%
-19
s %
-9
i %
-19g %-10
g"
,
stats
->
name
,
stats
->
count
,
tpt
,
percentage
);
}
ms_message
(
"==========================================================="
);
ms_list_free
(
sorted
);
}
src/videostream.c
View file @
fe26d776
...
...
@@ -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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment