[banshee/stable] Script to analyze service startup times
- From: Aaron Bockover <abock src gnome org>
- To: svn-commits-list gnome org
- Subject: [banshee/stable] Script to analyze service startup times
- Date: Fri, 24 Apr 2009 20:28:56 -0400 (EDT)
commit bc127273ef3bfdf1c2846ac7e4456d0983c40ad4
Author: Aaron Bockover <abockover novell com>
Date: Fri Apr 24 20:31:00 2009 -0400
Script to analyze service startup times
---
Makefile.am | 7 ++++---
extras/perf-analyze-log | 18 ++++++++++++++++++
2 files changed, 22 insertions(+), 3 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index f30b6c9..e0fd8c5 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -30,9 +30,10 @@ $(MO_FILES): $(LC_BUILD)/%/LC_MESSAGES/$(PACKAGE).mo: po/%.gmo
cp -af '$<' '$@'
run: $(MO_FILES)
- @pushd bin; \
- $(MONO) --debug $(BANSHEE_DEV_MONO_OPTIONS) Nereid.exe --debug --uninstalled $(BANSHEE_DEV_OPTIONS); \
- popd;
+ (cd bin; $(MONO) --debug $(BANSHEE_DEV_MONO_OPTIONS) Nereid.exe --debug --uninstalled $(BANSHEE_DEV_OPTIONS) | tee last-run-log)
+
+run-perf: run
+ extras/perf-analyze-log bin/last-run-log
gdb:
@pushd bin; \
diff --git a/extras/perf-analyze-log b/extras/perf-analyze-log
new file mode 100755
index 0000000..de740e6
--- /dev/null
+++ b/extras/perf-analyze-log
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+[[ -e "$1" ]] || {
+ echo "File does not exist: $1";
+ exit 1;
+}
+
+for SERVICE_TYPE in Core Extension; do
+ echo "$SERVICE_TYPE Services:"
+ awk '/'"$SERVICE_TYPE"' service started/{
+ gsub(/[\(\)\,]/, "")
+ gsub(/[0-9]s$/, "")
+ print "\t" $7 "\t " $6
+ }' < "$1" | sort -nr
+ echo
+done
+
+
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]