File: gmetrics-BasicHtmlReportWriter.html

package info (click to toggle)
gmetrics 0.7-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,948 kB
  • sloc: xml: 12,897; java: 64; makefile: 13
file content (190 lines) | stat: -rw-r--r-- 13,811 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- Generated by Apache Maven Doxia at Jan 31, 2015 -->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>GMetrics - GMetrics BasicHtmlReportWriter</title>
    <style type="text/css" media="all">
      @import url("./css/maven-base.css");
      @import url("./css/maven-theme.css");
      @import url("./css/site.css");
    </style>
    <link rel="stylesheet" href="./css/print.css" type="text/css" media="print" />
    <meta name="Date-Revision-yyyymmdd" content="20150131" />
    <meta http-equiv="Content-Language" content="en" />
                  
  </head>
  <body class="composite">
    <div id="banner">
                  <a href="" id="bannerLeft">
                GMetrics
                </a>
                    <div class="clear">
        <hr/>
      </div>
    </div>
    <div id="breadcrumbs">
            
        
                <div class="xleft">
        <span id="publishDate">Last Published: 31 Jan 2015</span>
                  &nbsp;| <span id="projectVersion">Version: 0.7</span>
                      </div>
            <div class="xright">        
        
      </div>
      <div class="clear">
        <hr/>
      </div>
    </div>
    <div id="leftColumn">
      <div id="navcolumn">
             
        
                                <h5>General</h5>
                  <ul>
                  <li class="none">
                          <a href="index.html" title="Home">Home</a>
            </li>
                  <li class="none">
                          <a href="http://sourceforge.net/projects/gmetrics/files/" class="externalLink" title="Downloads">Downloads</a>
            </li>
                  <li class="none">
                          <a href="apidocs/index.html" title="Javadocs">Javadocs</a>
            </li>
                  <li class="none">
                          <a href="http://sourceforge.net/projects/gmetrics" class="externalLink" title="SourceForge Project">SourceForge Project</a>
            </li>
          </ul>
                       <h5>Running</h5>
                  <ul>
                  <li class="none">
                          <a href="gmetrics-ant-task.html" title="Ant Task Usage">Ant Task Usage</a>
            </li>
                  <li class="none">
                          <a href="gmetrics-other-tools-frameworks.html" title="Other Tools/Frameworks">Other Tools/Frameworks</a>
            </li>
          </ul>
                       <h5>Using</h5>
                  <ul>
                  <li class="none">
                          <a href="gmetrics-creating-metricset.html" title="Creating a MetricSet">Creating a MetricSet</a>
            </li>
                  <li class="none">
                          <a href="gmetrics-DefaultMetricSet.html" title="The Default MetricSet">The Default MetricSet</a>
            </li>
          </ul>
                       <h5>Reports</h5>
                  <ul>
                  <li class="none">
            <strong>BasicHtmlReportWriter</strong>
          </li>
                  <li class="none">
                          <a href="gmetrics-SingleSeriesHtmlReportWriter.html" title="SingleSeriesHtmlReportWriter">SingleSeriesHtmlReportWriter</a>
            </li>
                  <li class="none">
                          <a href="gmetrics-XmlReportWriter.html" title="XmlReportWriter">XmlReportWriter</a>
            </li>
                  <li class="none">
                          <a href="gmetrics-sampleReports.html" title="Sample Reports">Sample Reports</a>
            </li>
          </ul>
                       <h5>Metrics</h5>
                  <ul>
                  <li class="none">
                          <a href="gmetrics-AbcMetric.html" title="ABC">ABC</a>
            </li>
                  <li class="none">
                          <a href="gmetrics-AfferentCouplingMetric.html" title="AfferentCoupling">AfferentCoupling</a>
            </li>
                  <li class="none">
                          <a href="gmetrics-ClassCountMetric.html" title="ClassCount">ClassCount</a>
            </li>
                  <li class="none">
                          <a href="gmetrics-ClassLineCountMetric.html" title="ClassLineCount">ClassLineCount</a>
            </li>
                  <li class="none">
                          <a href="gmetrics-CoberturaBranchCoverageMetric.html" title="CoberturaBranchCoverageMetric">CoberturaBranchCoverageMetric</a>
            </li>
                  <li class="none">
                          <a href="gmetrics-CoberturaLineCoverageMetric.html" title="CoberturaLineCoverageMetric">CoberturaLineCoverageMetric</a>
            </li>
                  <li class="none">
                          <a href="gmetrics-CrapMetric.html" title="CrapMetric">CrapMetric</a>
            </li>
                  <li class="none">
                          <a href="gmetrics-CyclomaticComplexityMetric.html" title="CyclomaticComplexity">CyclomaticComplexity</a>
            </li>
                  <li class="none">
                          <a href="gmetrics-EfferentCouplingMetric.html" title="EfferentCoupling">EfferentCoupling</a>
            </li>
                  <li class="none">
                          <a href="gmetrics-FieldCountMetric.html" title="FieldCount">FieldCount</a>
            </li>
                  <li class="none">
                          <a href="gmetrics-MethodLineCountMetric.html" title="MethodLineCount">MethodLineCount</a>
            </li>
                  <li class="none">
                          <a href="gmetrics-MethodCountMetric.html" title="MethodCount">MethodCount</a>
            </li>
          </ul>
                                                                                                                   <a href="http://sourceforge.net" title="Hosted on SourceForge.net" class="poweredBy">
        <img class="poweredBy"  alt="Hosted on SourceForge.net" src="http://sflogo.sourceforge.net/sflogo.php?group_id=208647&type=2"    />
      </a>
                                                                                                          <a href="http://maven.apache.org" title="Build with Maven 2" class="poweredBy">
        <img class="poweredBy"  alt="Build with Maven 2" src="images/logos/maven-feather.png"    />
      </a>
                       
        
            </div>
    </div>
    <div id="bodyColumn">
      <div id="contentBox">
        <div class="section"><h2>BasicHtmlReportWriter<a name="BasicHtmlReportWriter"></a></h2><!-- ~~~~~~~~~~~~~~~~~~~ --><div class="section"><h3>Description<a name="Description"></a></h3><!-- ~~~~~~~~~~~ --><p>The <tt>org.gmetrics.report.BasicHtmlReportWriter</tt> class produces an HTML report of metric results in a single HTML table, with one row for each package, class or method (or closure field) and one column for each metric value (function) being calculated.</p><p>See a <a href="./SampleGMetricsReport.html">Sample Report</a>.</p></div><div class="section"><h3>Option Nested Elements<a name="Option_Nested_Elements"></a></h3><!-- ~~~~~~~~~~~~~~~~~~~~~~ --><p>The <b>option</b> element is a child of the <b>report</b> element and defines a report-specific option for a report.</p><p><tt>org.gmetrics.report.BasicHtmlReportWriter</tt> supports the following options:</p><table border="1" class="bodyTable"><tr class="a"><td align="left"><b>Attribute</b></td><td align="left"><b>Description</b></td><td align="left"><b>Required</b></td></tr><tr class="b"><td align="left">functions</td><td align="left">The (comma-separated) list of functions for which results are included in the report for a particular metric. Multiple metrics are configured by separating them with semicolons (;). By default, all functions provided by a metric are included within the report. Any metrics not explicitly configured include all applicable functions as well. ---- Valid <i>function</i> values are metric-specific, but typically include &quot;total&quot;, &quot;average&quot;, &quot;minimum&quot; and &quot;maximum&quot;. ---- For example, a value of <tt>&quot;MethodLineCount=minimum,average&quot;</tt> for <tt>functions</tt> includes only the <i>minimum</i> and <i>average</i> function results for the <b>MethodLineCount</b> metric. Likewise, a value of <tt>&quot;ABC=average; CyclomaticComplexity=total,maximum&quot;</tt> includes the <i>average</i> function results for the <b>ABC</b> metric and the <i>total</i> and <i>maximum</i> function results for the <b>CyclomaticComplexity</b> metric. Note that all functions provided by any other metrics (not configured) are included.</td><td align="left">No</td></tr><tr class="a"><td align="left">levels</td><td align="left">The (comma-separated) list of levels at which results are included in the report for a particular metric. Multiple metrics are configured by separating them with semicolons (;). By default, all levels are included for all metrics within the report. Any metrics not explicitly configured include all applicable levels as well. ---- Valid <i>level</i> values are &quot;package&quot;, &quot;class&quot; and &quot;method&quot;. ---- For example, a value of <tt>&quot;MethodLineCount=class,method&quot;</tt> for <tt>levels</tt> includes only the <i>class</i> and <i>method</i> level results for the <b>MethodLineCount</b> metric. Likewise, a value of <tt>&quot;ABC=method; CyclomaticComplexity=package,class&quot;</tt> includes the <i>method</i> level results for the <b>ABC</b> metric and the <i>package</i> and <i>class</i> level results for the <b>CyclomaticComplexity</b> metric. Note that all levels are included for any other metrics not explicitly configured.</td><td align="left">No</td></tr><tr class="b"><td align="left">reportLevels</td><td align="left">The (comma-separated) list of levels included in the report for all metrics. By default, all levels are included in the report. ---- Valid <i>level</i> values are &quot;package&quot;, &quot;class&quot; and &quot;method&quot;. ---- For example, a value of <tt>&quot;package,method&quot;</tt> for <tt>reportLevels</tt> includes only rows for the <i>package</i> and <i>method</i>.</td><td align="left">No</td></tr><tr class="a"><td align="left">metrics</td><td align="left">The (comma-separated) list of names of the metrics included in the report. By default, all metrics within the results are included in the report. ---- For example, a <tt>metrics</tt> value of <tt>&quot;ABC, MethodLineCount&quot;</tt> includes only the <b>ABC</b> and <b>MethodLineCount</b> metrics within the report.</td><td align="left">No</td></tr><tr class="b"><td align="left">outputFile</td><td align="left">The path and filename for the output report file.</td><td align="left">No</td></tr><tr class="a"><td align="left">title</td><td align="left">The title for the output report.</td><td align="left">No</td></tr><tr class="b"><td align="left">writeToStandardOut</td><td align="left">Set to &quot;true&quot; or <tt>true</tt> to write out the report to <i>stdout</i> (<tt>System.out</tt>) instead of writing to a file.</td><td align="left">No</td></tr></table></div><div class="section"><h3>Example<a name="Example"></a></h3><!-- ~~~~~~~ --><p>Here is an example Ant XML build file illustrating configuration of <tt>org.gmetrics.report.BasicHtmlReportWriter</tt>.</p><div class="source"><pre>&lt;taskdef name=&quot;gmetrics&quot; classname=&quot;org.gmetrics.ant.GMetricsTask&quot;&gt;
&lt;target name=&quot;runGMetrics&quot;&gt;

    &lt;gmetrics&gt;
        &lt;report type=&quot;org.gmetrics.report.BasicHtmlReportWriter&quot;&gt;
            &lt;option name=&quot;outputFile&quot; value=&quot;SampleGMetricsReport.html&quot; /&gt;
            &lt;option name=&quot;title&quot; value=&quot;Sample&quot; /&gt;
        &lt;/report&gt;
        &lt;fileset dir=&quot;src&quot;&gt;
            &lt;include name=&quot;**/*.groovy&quot;/&gt;
        &lt;/fileset&gt;
    &lt;/gmetrics&gt;

&lt;/target&gt;
</pre></div><p>And here is an example illustrating explicit configuration of the <i>metrics</i>, <i>levels</i> and <i>functions</i> to be included within the report:</p><div class="source"><pre>&lt;taskdef name=&quot;gmetrics&quot; classname=&quot;org.gmetrics.ant.GMetricsTask&quot;&gt;
&lt;target name=&quot;runGMetrics&quot;&gt;

    &lt;gmetrics&gt;
        &lt;report type=&quot;org.gmetrics.report.BasicHtmlReportWriter&quot;&gt;
            &lt;option name=&quot;outputFile&quot; value=&quot;SampleGMetricsReport.html&quot; /&gt;
            &lt;option name=&quot;title&quot; value=&quot;Sample&quot; /&gt;
            &lt;option name=&quot;metrics&quot; value=&quot;CyclomaticComplexity, ABC&quot; /&gt;
            &lt;option name=&quot;levels&quot; value=&quot;CyclomaticComplexity=class,method; ABC=method&quot; /&gt;
            &lt;option name=&quot;functions&quot; value=&quot;ABC=average; CyclomaticComplexity=total,maximum&quot; /&gt;
        &lt;/report&gt;
        &lt;fileset dir=&quot;src&quot;&gt;
            &lt;include name=&quot;**/*.groovy&quot;/&gt;
        &lt;/fileset&gt;
    &lt;/gmetrics&gt;

&lt;/target&gt;
</pre></div></div></div>
      </div>
    </div>
    <div class="clear">
      <hr/>
    </div>
    <div id="footer">
      <div class="xright">Copyright &#169;                   2015.
          All Rights Reserved.      
        
      </div>
      <div class="clear">
        <hr/>
      </div>
    </div>
  </body>
</html>