Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master sorcery by Jaka Kranjc (4be1b456d315b82c7d931266b1fa943018e7408a)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Jaka Kranjc <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master sorcery by Jaka Kranjc (4be1b456d315b82c7d931266b1fa943018e7408a)
  • Date: Fri, 27 Jun 2008 05:03:48 -0500

GIT changes to master sorcery by Jaka Kranjc <lynxlynxlynx AT sourcemage.org>:

ChangeLog | 5 ++++
usr/sbin/gaze | 52
+++++++++++++++++++++++++++++++++++++++++++---
usr/share/man/man1/gaze.1 | 4 +++
3 files changed, 58 insertions(+), 3 deletions(-)

New commits:
commit 4be1b456d315b82c7d931266b1fa943018e7408a
Author: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
Commit: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>

gaze: added time-system, which calculates the time the current system
took to build and install, based on each spell's timings. Can take a
--no-orphans parameter and type parameters like gaze time

diff --git a/ChangeLog b/ChangeLog
index 651db65..a93e622 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-06-27 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
+ * gaze: added time-system, which calculates the time the current
system
+ took to build and install, based on each spell's timings. Can take a
+ --no-orphans parameter and type parameters like gaze time
+
2008-06-25 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
* libtime: added to hold functions dealing with time calculations
fixed a comment with a new insight
diff --git a/usr/sbin/gaze b/usr/sbin/gaze
index aa19d50..7bce60e 100755
--- a/usr/sbin/gaze
+++ b/usr/sbin/gaze
@@ -127,6 +127,9 @@ time --full spell(s)
Shows previous spell cast time (without
summon)
computed in (all) different manners (see
above)

+time-system [--no-orphans] [--last|--median|--mean|--weigh-last]
+ Shows system cast time (without summon)
+
EOF
}

@@ -912,9 +915,22 @@ function show_orphans() {
if [[ ! $spell ]]; then
echo "$each"
fi
- done|sort
+ done
}

+#-----
+## Show spells that have other spell depending on them
+#-----
+function show_non_orphans() {
+ local spell each
+ compute_reverse_installed_depends my_hash
+ for each in $(get_all_spells_with_status ok); do
+ hash_get_ref my_hash $each spell
+ if [[ $spell ]]; then
+ echo "$each"
+ fi
+ done
+}



@@ -2033,6 +2049,8 @@ function gaze_show_spells_by_status () {
##
## Display the time spells took to compile and install. If gaze is in
## silent mode, pad all the times as needed.
+##
+## @param Type (optional) - tells which time calculation to use
## @param Spell
## @param ...
##
@@ -2110,6 +2128,34 @@ function gaze_time_full() {
done
}

+#---------------------------------------------------------------------
+##
+## Display the time all installed spells took to compile and install.
+## If --no-orphans is passed, they are skipped.
+##
+## @param orphans (optional) - skip orphans
+## @param type - see gaze_time
+##
+#---------------------------------------------------------------------
+function gaze_time_system() {
+ local type orphans
+
+ while [[ $1 == -* ]]; do
+ if [[ $1 == --no-orphans ]]; then
+ orphans=no
+ else
+ type=$1
+ fi
+ shift
+ done
+
+ if [[ $orphans == no ]]; then
+ gaze_time $type $(show_non_orphans | sort -u)
+ else
+ gaze_time $type $(get_all_spells_with_status ok | sort)
+ fi
+}
+
parse() {

# Maintain "TMP_DIR is always set as a global" invariant in the case of
@@ -2205,7 +2251,7 @@ parse() {
provides) shift; gaze_provides $@ ;;
depends) shift; gaze_show_depends "$@" ;;
dependencies) shift; gaze_show_dependencies "$@" ;;
- orphans) show_orphans ;;
+ orphans) show_orphans | sort ;;
history) show_spell_component HISTORY "$2" ;;
website|url) shift; gaze_show_website $@ ;;
maintainer) shift; show_maintainer $@ ;;
@@ -2218,7 +2264,7 @@ parse() {
size) shift; gaze_show_size $@ ;;
checkmd5s) shift; gaze_md5check $@ ;;
time) shift; gaze_time $@ ;;
-
+ time-system) shift; gaze_time_system $@ ;;
compile) if [ -n "$3" ]; then
VERSION=$3
elif [ -z "$VERSION" ]; then
diff --git a/usr/share/man/man1/gaze.1 b/usr/share/man/man1/gaze.1
index 050c1c0..8d59b47 100644
--- a/usr/share/man/man1/gaze.1
+++ b/usr/share/man/man1/gaze.1
@@ -257,6 +257,10 @@ weighted mean mode gives more weight to the last casting
time. If more then one
spell is specified, also a total time is shown.
.IP
If --full is specified, then all the calculations will be shown for each
spell.
+.SS time-system [--no-orphans] [--last|--median|--mean|--weigh-last|--full]
+.IP
+shows the time the whole system needed to get cast. If --no-orphans is
specified
+orphaned spells are skipped.
.SH "AUTHOR"
Original version written by Brian Peterson, modified by Kyle Sallee and
updated
by Thomas Stewart and Karsten Behrmann



  • [SM-Commit] GIT changes to master sorcery by Jaka Kranjc (4be1b456d315b82c7d931266b1fa943018e7408a), Jaka Kranjc, 06/27/2008

Archive powered by MHonArc 2.6.24.

Top of Page