ohsewon / test

0 stars 0 forks source link

[Performance] Support performance measurement facility #67

Open ohsewon opened 6 years ago

ohsewon commented 6 years ago

Issue by geunsik-lim Friday Jun 08, 2018 at 04:14 GMT Originally opened as https://github.sec.samsung.net/STAR/nnstreamer/issues/67


Background

We need to prepare a facility to measure performant of NNStreamer. It can be combined to NNStreamer CI as an automated inspection tool to avoid performance deterioration, unexpted performance bottleneck, and so on.

Pre-study:

image

ohsewon commented 6 years ago

Comment by git-bot-sec Friday Jun 08, 2018 at 04:14 GMT


:octocat: cibot: Thank you for posting issue #67. The person in charge will reply soon.

ohsewon commented 6 years ago

Comment by geunsik-lim Thursday Jul 12, 2018 at 06:04 GMT


Case study: Tracing Gstreamer plugins

Traces for buffer flow, events and messages in TRACE level:

GST_DEBUG="GST_TRACER:7,GST_BUFFER*:7,GST_EVENT:7,GST_MESSAGE:7" GST_TRACERS=log gst-launch-1.0 fakesrc num-buffers=10 ! fakesink -

Print some pipeline stats on exit:

GST_DEBUG="GST_TRACER:7" GST_TRACERS="stats;rusage" GST_DEBUG_FILE=trace.log gst-launch-1.0 fakesrc num-buffers=10 sizetype=fixed ! queue ! fakesink && gst-stats-1.0 trace.log

get ts, average-cpuload, current-cpuload, time and plot

GST_DEBUG="GST_TRACER:7" GST_TRACERS="stats;rusage" GST_DEBUG_FILE=trace.log /usr/bin/gst-play-1.0 $HOME/Videos/movie.mp4 && ./scripts/gst-plot-traces.sh --format=png | gnuplot eog trace.log.*.png

print processing latencies

GST_DEBUG="GST_TRACER:7" GST_TRACERS=latency gst-launch-1.0 \ audiotestsrc num-buffers=10 ! audioconvert ! volume volume=0.7 ! \ autoaudiosink

Raise a warning if a leak is detected

GST_TRACERS="leaks" gst-launch-1.0 videotestsrc num-buffers=10 ! fakesink

check if any GstEvent or GstMessage is leaked and raise a warning

GST_DEBUG="GST_TRACER:7" GST_TRACERS="leaks(GstEvent,GstMessage)" gst-launch-1.0 videotestsrc num-buffers=10 ! fakesink

Performance

run ./tests/benchmarks/tracing.sh <tracer(s)>

egrep -c "(proc|thread)-rusage" trace.log 658618 grep -c "gst_tracer_log_trace" trace.log 823351