diff options
-rw-r--r-- | ChangeLog | 18 | ||||
-rwxr-xr-x | bin/generate_compile_stats.sh | 91 |
2 files changed, 89 insertions, 20 deletions
diff --git a/ChangeLog b/ChangeLog index 4d9f678ab50..1f6aa6adc30 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,21 @@ +Mon Apr 14 18:35:23 UTC 2003 Don Hinton <dhinton@dresystems.com> + + * bin/generate_compile_stats.sh: + + Improved the html presentation by: + + - dividing ACE and TAO into two seperate pages. + - stripping off version numbers from libraries. + - stripping off the path from dependent objects (was + redundant and made it hard to read). + - sorting dependent object lists. + - stripping off the TAO/ part of the path for TAO object + since this was also redundant. + - always listing dependent objects even if there was only + one. + + Thanks to Bala for his suggestions. + Mon Apr 14 18:28:13 UTC 2003 Johnny Willemsen <jwillemsen@remedy.nl> * include/makeinclude/rules.lib.GNU: diff --git a/bin/generate_compile_stats.sh b/bin/generate_compile_stats.sh index e4b36654a30..e02e49460eb 100755 --- a/bin/generate_compile_stats.sh +++ b/bin/generate_compile_stats.sh @@ -260,6 +260,10 @@ composite_list () if [ $BASE_OBJ_FLAG -eq 1 ]; then BASE_OBJ="${DIR}${i##.*/}" + # strip off lib numbers + if [ "$BASE_OBJ" != "${BASE_OBJ%.so.*}" ]; then + BASE_OBJ=${BASE_OBJ%.so.*}.so + fi BASE_OBJ_FLAG=0 elif [ "$i" = "-o" ]; then # found our base object, set flag so we can grab the next one @@ -345,12 +349,29 @@ create_images () } +create_index_page () +{ + local TITLE="Compilation metrics for ACE+TAO" + + echo "<html>" + echo "<head><title>$TITLE</title></head>" + echo '<body text = "#000000" link="#000fff" vlink="#ff0f0f" bgcolor="#ffffff">' + echo "<br><center>$TITLE</center><br><hr>" + echo '<ul>' + echo '<li><a href="ace.html">ACE</a>' + echo '<li><a href="tao.html">TAO</a>' + echo '</ul>' + echo '</body></html>' +} + create_page () { + # always strip off "TAO___" local BASE=$1 - shift + local BASE_NAME=${BASE#TAO___} + #shift #local OBJECTS=$2 - local TITLE="Compilation metrics for ${BASE//___//}" + local TITLE="Compilation metrics for ${BASE_NAME//___//}" # header echo "<html>" @@ -363,45 +384,75 @@ create_page () echo 'width="640" height="480"></P></DIV><HR>' fi - #echo "$OBJECTS<br>" - # now list all the interal object (if more than one) - if [ -n "$2" ]; then - echo "<ul>" - for i in $@; do - if [ -e ".metrics/${i}.html" ]; then - echo "<li><a href=\"$i.html\">${i//___//}</a>" - elif [ -e ".metrics/images/${i}.png" ]; then - echo "<li><a href=\"images/$i.png\">${i//___//}</a>" - fi - done # for - echo '</ul>' - fi - + echo "<ul>" + #for i in $@; do + while read i; do + if [ -e ".metrics/${i}.html" ]; then + # strip off "TAO___" if it exists + NAME=${i#TAO___} + echo "<li><a href=\"$i.html\">${NAME//___//}</a>" + elif [ -e ".metrics/images/${i}.png" ]; then + # since you'll only have images if it's a composite, strip off the + # path for the name + echo "<li><a href=\"images/$i.png\">${i##*___}</a>" + fi + done # for + echo '</ul>' + # footer echo '</body></html>' } +sort_list () +{ + # sort the dependency files + if [ -e .metrics/tmp_list ]; then + rm .metrics/tmp_list + fi + + touch .metrics/tmp_list + for i in $@; do + echo "$i" >> .metrics/tmp_list + #echo $i + done + + sort .metrics/tmp_list +} + create_html () { echo "create_html()" local DEST=$1 local ALL_BASE="" + local ACE_OBJS="" + local TAO_OBJS="" while read base colon files; do #echo "$base" # create individual page for app/lib #echo "creating $base.html with $files" - create_page $base $files > .metrics/$base.html + + sort_list $files | create_page $base > .metrics/$base.html cp .metrics/$base.html $DEST/$base.html - ALL_BASE="$ALL_BASE $base" + if [ "$base" != "${base#TAO}" ]; then + TAO_OBJS="$TAO_OBJS $base" + else + ACE_OBJS="$ACE_OBJS $base" + fi + ALL_OBJS="$ALL_BASE $base" done # create main page - #echo "createing index.html with $ALL_BASE" - create_page "ACE+TAO" $ALL_BASE > .metrics/index.html + create_index_page > .metrics/index.html cp .metrics/index.html $DEST/index.html + + sort_list $ACE_OBJS | create_page "ACE" > .metrics/ace.html + cp .metrics/ace.html $DEST/ace.html + + sort_list $TAO_OBJS | create_page "TAO" > .metrics/tao.html + cp .metrics/tao.html $DEST/tao.html } |