[debian-edu-commits] debian-edu/ 133/183: - Document performance with cache - include update-profile-cache man page in package - Don't use cache in Xsession.d script if it's out-of-date - mention addition of caching in the package changelog

Alexander Alemayhu ccscanf-guest at moszumanska.debian.org
Wed Jun 11 16:48:40 UTC 2014


This is an automated email from the git hooks/post-receive script.

ccscanf-guest pushed a commit to branch master
in repository desktop-profiles.

commit f3e2db9aaa459e532a7e2329e1c03a25eb10aa8b
Author: Bart Cornelis <cobaco at linux.be>
Date:   Wed Dec 13 20:42:31 2006 +0000

    - Document performance with cache
    - include update-profile-cache man page in package
    - Don't use cache in Xsession.d script if it's out-of-date
    - mention addition of caching in the package changelog
---
 20desktop-profiles_activateDesktopProfiles |  5 ++--
 README                                     | 46 +++++++++++++++++++-----------
 debian/changelog                           |  7 +++--
 debian/rules                               |  2 +-
 4 files changed, 38 insertions(+), 22 deletions(-)

diff --git a/20desktop-profiles_activateDesktopProfiles b/20desktop-profiles_activateDesktopProfiles
index ff1738d..1419951 100644
--- a/20desktop-profiles_activateDesktopProfiles
+++ b/20desktop-profiles_activateDesktopProfiles
@@ -294,8 +294,9 @@ if (test $INSTALLED = true); then
   ############################################################
   # Actual activation of profiles
   ############################################################
-  if (test -r $CACHE_FILE); then 
-  # if we have a cache then use it
+  if (test -r $CACHE_FILE) &&
+     (test $(ls -t -1 /etc/desktop-profiles/*.listing $CACHE_FILE | head -1) = "$CACHE_FILE"); then
+  # if we have a cache and it's up-to-date -> use it
     export $(cat $CACHE_FILE);
   elif (test "$ACTIVE_PROFILE_KINDS"x != "x"); then
   # else if we have any profile kinds we're interested in, then go 
diff --git a/README b/README
index 2cde257..747227d 100644
--- a/README
+++ b/README
@@ -40,36 +40,48 @@ KNOWN BUGS
 
 PERFORMANCE
 =-=-=-=-=-=
-For those wondering about performance, I did some benchmarking showing the
-following:
+For those wondering about performance, I did some benchmarking of the Xsession.d
+script yielding the following results[NOTE]:
 
-- needed execution time of the script is linear in respect to the number of 
-  profiles (i.e. O(n) with n = #profiles), tested up to a 100 profiles.
+- needed execution time of the script when dynamicaly checking which profiles 
+  should be activated is linear in respect to the number of profiles 
+  (i.e. O(n) with n = #profiles), tested up to a 100 profiles.
 
-- with /bin/sh pointing to dash (averaged over 10 runs)
+  * dynamic activation with /bin/sh pointing to dash (averaged over 10 runs)
 			out-of-the-box	20	30	40	50	60
   pentium2 350 Mhz:		0.594	0.980	1.168	1.369	1.557	1.751
   celeron M 1.4 Ghz:		0.100	0.140	0.170	0.212	0.248	0.284	
   centrino duo 1.83 GHz:	0.080	0.121	0.150	0.188	0.220	0.254
 
-- with /bin/sh pointing to bash (averaged over 10 runs)
+  * dynamic activation with /bin/sh pointing to bash (averaged over 10 runs)
 			out-of-the-box	20	30	40	50	60
   pentium2 350 Mhz:		0.983	1.534	1.878	2.236	2.585	2.944
   celeron M 1.4 Ghz:		0.163	0.241	0.316	0.387	0.460	0.530
   centrino duo 1.83 GHz:	0.153	0.222	0.290	0.359	0.429	0.494
 
--> performance when /bin/sh points to dash about 40-45% faster as when it 
-   points to bash.
+  -> performance when /bin/sh points to dash about is 40-45% faster as when it 
+     points to bash.
   
-   pentium2 350 Mhz = 128 MB RAM, Quantum Fireball Ex4.3A HD
-   celeron 1.4 Ghz = Acer Travelmate 2312LM, 256 MB RAM, HTS726060M9AT00 HD
-   centrino duo 1.83 Ghz = HP nx9420, 512 MB RAM, FUJITSU MHV2100B HD
-
-For those that want to run the performance tests on their own systems
-the testscript and metadata-sets I used can be found in the tests.tgz file in
-/usr/share/doc/desktop-profiles. The test script in there needs to be run as
-a user with write priviliges to the directory /etc/desktop-profiles, and will
-test performance with both dash (if present) and bash and up-to a 100 profiles.
+- needed execution time in the simple case with an up-to-date cache is constant 
+  and so small as to be negligable even on old systems:
+
+   * with up-to-date cache 
+     				/bin/sh -> dash		/bin/sh -> bash
+     pentium2 350 Mhz:		0.010			0.092
+     celeron M 1.4 Ghz:		0 (to small to measure)	0.010 
+     centrino duo 1.83 Ghz:	0 (to small to measure) 0.010
+
+- Here's some more info about the machines I ran the test on:  
+   pentium2 350 Mhz -> 128 MB RAM, Quantum Fireball Ex4.3A HD
+   celeron 1.4 Ghz -> Acer Travelmate 2312LM, 256 MB RAM, HTS726060M9AT00 HD
+   centrino duo 1.83 Ghz -> HP nx9420, 512 MB RAM, FUJITSU MHV2100B HD
+
+NOTE: For those that want to run the performance tests on their own systems
+      the testscript and metadata-sets I used can be found in the tests.tgz file
+      in /usr/share/doc/desktop-profiles. The test script in there needs to be
+      run as a user with write priviliges to the directory /etc/desktop-profiles
+      and will test performance with both dash (if present) and bash and up-to 
+      100 profiles.
 
 GCONF PROFILES 
 =-=-=-=-=-=-=-=
diff --git a/debian/changelog b/debian/changelog
index 24ba189..0a532f6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,12 +6,15 @@ desktop-profiles (1.4.14) UNRELEASED; urgency=low
     supported out-of-the-box assuming goncf2 >=2.14.0-5
   * Be more carefull with temporary files:
     - Add signal traps to ensure we don't leave tempfiles behind inadvertently
-      if interrupted halfway
+      if interrupted halfway through the Xsession.d script
     - don't create user path files if we don't add any gconf sources
   * Added observations about performance to README, and add zip with the
     performance test script and test data sets in /usr/share/doc
+  * Added caching of profile-activation in the simple case where the result
+    is a static machine wide set of profiles (that is when no group or command
+    requirements are present in potentially active profiles).
 
- -- Bart Cornelis (cobaco) <cobaco at linux.be>  Wed, 29 Nov 2006 00:34:12 +0100
+ -- Bart Cornelis (cobaco) <cobaco at linux.be>  Wed, 13 Dec 2006 21:00:33 +0100
 
 desktop-profiles (1.4.13) unstable; urgency=low
 
diff --git a/debian/rules b/debian/rules
index ef649e8..2c7a2d0 100755
--- a/debian/rules
+++ b/debian/rules
@@ -38,7 +38,7 @@ binary-indep: build install
 	dh_installdocs
 	dh_installmenu
 	dh_installcron
-	dh_installman desktop-profiles.7 list-desktop-profiles.1 dh_installlisting.1 profile-manager.1 path2listing.1
+	dh_installman desktop-profiles.7 list-desktop-profiles.1 update-profile-cache.1 dh_installlisting.1 profile-manager.1 path2listing.1
 	dh_install dh_installlisting update-profile-cache profile-manager usr/bin
 	dh_install listingmodule get_desktop-profiles_variables path usr/share/desktop-profiles/
 	dh_install postinst-desktop-profiles usr/share/debhelper/autoscripts/

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-edu/pkg-team/desktop-profiles.git



More information about the debian-edu-commits mailing list