From: Jaroslav Kysela Date: Fri, 23 Mar 2018 16:53:23 +0000 (+0100) Subject: Makefile: add perf section X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e0d5ab87fab5699d9253a661de371cd7f935d342;p=thirdparty%2Ftvheadend.git Makefile: add perf section --- diff --git a/Makefile b/Makefile index df981ca3b..e796073c2 100644 --- a/Makefile +++ b/Makefile @@ -901,3 +901,24 @@ $(ROOTDIR)/data/dvb-scan/dvb-s/.stamp: $(ROOTDIR)/data/satellites.xml \ .PHONY: satellites_xml satellites_xml: $(ROOTDIR)/data/dvb-scan/dvb-s/.stamp + +# +# perf +# + +PERF_DATA = /tmp/tvheadend.perf.data +PERF_SLEEP ?= 30 + +$(PERF_DATA): FORCE + perf record -F 16000 -g -p $$(pidof tvheadend) -o $(PERF_DATA) sleep $(PERF_SLEEP) + +.PHONY: perf-record +perf-record: $(PERF_DATA) + +.PHONY: perf-graph +perf-graph: + perf report --stdio -g graph -i $(PERF_DATA) + +.PHONY: perf-report +perf-report: + perf report --stdio -g none -i $(PERF_DATA)