Changeset b056ff3 in rtems-testing


Ignore:
Timestamp:
Jan 5, 2011, 9:21:35 PM (8 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.11, 8895273c193787f84c4585a10f6d6aceb3b25dc4
Children:
d04ad1f
Parents:
62d266d
Message:

2011-01-05 Joey Geralnik <jgeralnik@…>

  • generate_coverage_html: Add timeplot output as part of Google Code In 2010.
Location:
rtems-coverage
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • rtems-coverage/ChangeLog

    r62d266d rb056ff3  
     12011-01-05      Joey Geralnik <jgeralnik@gmail.com>
     2
     3        * generate_coverage_html: Add timeplot output as part of Google Code In
     4        2010.
     5
    162010-12-06      Matthew Voegeli <matthewvoegeli@gmail.com>
    27
  • rtems-coverage/generate_coverage_html

    r62d266d rb056ff3  
    7777<HTML>
    7878<HEAD>
    79 <TITLE>RTEMS 
     79<TITLE>RTEMS
    8080EOF
    8181
     
    125125<HTML>
    126126<HEAD>
    127 <TITLE>RTEMS 
     127<TITLE>RTEMS
    128128EOF
    129129
     
    162162
    163163# need to use ${1} for parameter
    164 # need to pass 
     164# need to pass
    165165convert_flags() {
    166166  opt=`echo "-${1}" | cut -c1-3`
     
    194194<thead>
    195195<tr class="heading-title">
    196 <td width="40%">Result Tables</td>
    197 <td width="40%">Time Series Graphs</td>
     196<td width="30%">Result Tables</td>
     197<td width="30%">Time Series Graphs</td>
     198<td width="30%">TimePlot Graphs</td>
    198199</thead>
    199200</tr>
     
    233234echo "<li><a href=\"graphs/${BSP}-uncovered_bytes-D.png\">"
    234235echo "  Uncovered Bytes (Developmental)</a></li>"
     236
     237cat <<EOF
     238</ul>
     239</td>
     240<td>
     241<ul>
     242EOF
     243
     244echo "<li><a href=\"graphs/timeplot-${BSP}.html\">"
     245echo "  TimePlot Graphs</a></li>"
     246
     247echo "<li><a href=\"graphs/timeplot-${BSP}.html#uncovered_percent\">"
     248echo "  Uncovered Percentage</a></li>"
     249
     250echo "<li><a href=\"graphs/timeplot-${BSP}.html#total_bytes\">"
     251echo "  Total Bytes Analyzed</a></li>"
     252
     253echo "<li><a href=\"graphs/timeplot-${BSP}.html#ranges\">"
     254echo "  Uncovered Ranges</a></li>"
     255
     256echo "<li><a href=\"graphs/timeplot-${BSP}.html#uncovered_bytes\">"
     257echo "  Uncovered Bytes</a></li>"
    235258
    236259cat <<EOF
     
    327350cleanup()
    328351{
    329   for bsp in ${BSPs} 
     352  for bsp in ${BSPs}
    330353  do
    331354    count=`ls -1 ${bsp}*.tar.bz2 | wc -l`
     
    339362      done
    340363    fi
    341    
     364
    342365  done
    343366}
     
    446469  echo "set title \"${TITLE}\""
    447470  echo "set key left box"
    448  
     471
    449472  echo "plot \"${OUT}/${bsp}-Osp${DEV}-${FIELD}.dat\" using 1:2 index 0 \\"
    450473  echo "  title \"Osp${DEV}\" with lines lw 2, \\"
     
    475498    Month=`echo ${timestamp} | cut -c5-6`
    476499    Day=`echo ${timestamp} | cut -c7-8`
    477     Hour=`echo ${timestamp} | cut -c10-11`
    478     Minute=`echo ${timestamp} | cut -c12-13`
    479     stamp="${Year}-${Month}-${Day}/${Hour}:${Minute}"
     500    stamp="${Year}-${Month}-${Day}"
    480501
    481502    echo ${stamp} ${num}
    482   done
     503  done
     504}
     505
     506gen_timeplot()
     507{
     508BSP=$1
     509
     510cat <<EOF
     511<HTML>
     512<HEAD>
     513<TITLE>${BSP} Timeplot Graphs</TITLE>
     514<meta http-equiv="Content-Language" content="English" />
     515<meta http-equiv="Content-Type" content="text/html; charset=us-ascii" />
     516<link rel="stylesheet" type="text/css" href="rtems/style.css" media="screen" />
     517EOF
     518
     519cat << EOF
     520
     521    <script src="http://api.simile-widgets.org/timeplot/1.1/timeplot-api.js"
     522       type="text/javascript"></script>
     523    <script type="text/javascript">
     524      var timeplot = [];
     525      var types  = ["O2pd", "O2pD", "O2Pd", "O2PD", "Ospd", "OspD", "OsPd", "OsPD"];
     526      var graphs = ["ranges", "total_bytes", "uncovered_bytes", "uncovered_percent"];
     527      var lineColors = ["#ff0000", "#D0A825", "#336699", "#99FF00", "#336666", "#33CC33", "#990099", "#FF0099"];
     528      var eventsources;
     529      var plotInfo;
     530
     531      function onLoad() {
     532        for( i = 0; i<graphs.length; i++)
     533        {
     534            var timeGeometry = new Timeplot.DefaultTimeGeometry({
     535                gridColor: new Timeplot.Color("#000000"),
     536                axisLabelsPlacement: "top"
     537            });
     538
     539            var valueGeometry = new Timeplot.DefaultValueGeometry({
     540                gridColor: "#000000",
     541                axisLabelsPlacement: "left"
     542            });
     543
     544            eventsources = [];
     545            plotInfo = [];
     546            for( j = 0; j<types.length; j++)
     547            {
     548              eventsources[j] = new Timeplot.DefaultEventSource();
     549              plotInfo[j] = Timeplot.createPlotInfo({
     550                 id: "plot"+(j+1),
     551                 dataSource: new Timeplot.ColumnSource(eventsources[j],1),
     552                 timeGeometry: timeGeometry,
     553                 valueGeometry: valueGeometry,
     554                 lineColor: lineColors[j]
     555              });
     556            }
     557            timeplot[i] = Timeplot.create(document.getElementById(graphs[i]+"-timeplot"), plotInfo);
     558            for( j = 0; j<types.length; j++)
     559            {
     560              timeplot[i].loadText("../plot_data/" + "${BSP}-" + types[j] + "-" + graphs[i] + ".dat", " ", eventsources[j]);
     561            }
     562          }
     563      }
     564      var resizeTimerID = null;
     565      function onResize() {
     566        if (resizeTimerID == null) {
     567        resizeTimerID = window.setTimeout(
     568                    function() {
     569                        resizeTimerID = null;
     570                        for( i = 0; i< timeplot.lenght; i++)
     571                        {
     572                          timeplot[i].repaint();
     573                        }
     574                    }, 100);
     575          }
     576      }
     577
     578    </script>
     579  </head>
     580  <body onload="onLoad();" onresize="onResize();">
     581    <li><a href="#uncovered_percent">Uncovered Percentage Graph</a></li>
     582    <li><a href="#total_bytes">Total Bytes Analyzed Graph</a></li>
     583    <li><a href="#ranges">Uncovered Ranges Graph</a></li>
     584    <li><a href="#uncovered_bytes">Uncovered Bytes Graph</a></li>
     585
     586    <ul id="legend">
     587      <li style="color:#ff0000">O2pd</li>
     588      <li style="color:#D0A825">O2pD</li>
     589      <li style="color:#336699">O2Pd</li>
     590      <li style="color:#99FF00">O2PD</li>
     591      <li style="color:#336666">Ospd</li>
     592      <li style="color:#33CC33">OspD</li>
     593      <li style="color:#990099">OsPd</li>
     594      <li style="color:#ff0099">OsPD</li>
     595    </ul>
     596
     597
     598    <h2 id="uncovered_percent">Uncovered Percentage</h2>
     599    <a href="#legend">Legend</a>
     600    <div id="uncovered_percent-timeplot" style="height: 500px;"></div>
     601    <h2 id="total_bytes">Total Bytes Analyzed</h2>
     602    <a href="#legend">Legend</a>
     603    <div id="total_bytes-timeplot" style="height: 500px;"></div>
     604    <h2 id="ranges">Uncovered Ranges</h2>
     605    <a href="#legend">Legend</a>
     606    <div id="ranges-timeplot" style="height: 500px;"></div>
     607    <h2 id="uncovered_bytes">Uncovered bytes</h2>
     608    <a href="#legend">Legend</a>
     609    <div id="uncovered_bytes-timeplot" style="height: 500px;"></div>
     610  </body>
     611</html>
     612EOF
    483613}
    484614
     
    493623
    494624# now generate a page per BSP
    495 for bsp in ${BSPs} 
     625for bsp in ${BSPs}
    496626do
    497   echo "Processing ${bsp}..."
     627  echo "Generating BSP Page for ${bsp}..."
    498628  do_perBSPPage ${bsp} >${bsp}.html
    499629done
     
    510640for bsp in ${BSPs}
    511641do
     642  echo "Generating Static Plots for ${bsp}..."
    512643  for FIELD in ranges total_bytes uncovered_bytes \
    513     uncovered_percent #covered_percent 
     644    uncovered_percent #covered_percent
    514645  do
    515646    # Pattern to find in summary.txt
     
    534665      #echo gnuplot ${pltfile}
    535666      gnuplot ${pltfile}
     667
    536668    done
    537669  done
     670
     671  echo "Generating Time Plots for ${bsp}..."
     672  timeplotfile=${OUTFIG}/timeplot-${bsp}.html
     673  gen_timeplot ${bsp} > ${timeplotfile}
    538674done
    539675exit 0
Note: See TracChangeset for help on using the changeset viewer.