123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="utf-8">
- <title>Metrix++ Project</title>
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <meta name="description" content="">
- <meta name="author" content="">
- <!-- Le styles -->
- <!--
- <link href="../../style.css" rel="stylesheet">
- -->
- <link href="assets/css/bootstrap.css" rel="stylesheet">
- <link href="assets/css/bootstrap-responsive.css" rel="stylesheet">
- <link href="assets/css/docs.css" rel="stylesheet">
- <link href="assets/js/google-code-prettify/prettify.css" rel="stylesheet">
-
- <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
- <!--[if lt IE 9]>
- <script src="assets/js/html5shiv.js"></script>
- <![endif]-->
- <!-- Le fav and touch icons -->
- <link rel="apple-touch-icon-precomposed" sizes="144x144" href="assets/ico/apple-touch-icon-144-precomposed.png">
- <link rel="apple-touch-icon-precomposed" sizes="114x114" href="assets/ico/apple-touch-icon-114-precomposed.png">
- <link rel="apple-touch-icon-precomposed" sizes="72x72" href="assets/ico/apple-touch-icon-72-precomposed.png">
- <link rel="apple-touch-icon-precomposed" href="assets/ico/apple-touch-icon-57-precomposed.png">
- <link rel="shortcut icon" href="assets/ico/favicon.png">
- <!--
- <script type="text/javascript">
- var _gaq = _gaq || [];
- _gaq.push(['_setAccount', 'UA-146052-10']);
- _gaq.push(['_trackPageview']);
- (function() {
- var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
- ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
- var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
- })();
- </script>
- -->
- </head>
- <body data-spy="scroll" data-target=".bs-docs-sidebar">
- <!-- Navbar
- ================================================== -->
- <div class="navbar navbar-link navbar-fixed-top">
- <div class="navbar-inner">
- <div class="container">
- <button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
- <span class="icon-bar"></span>
- <span class="icon-bar"></span>
- <span class="icon-bar"></span>
- </button>
- <a class="brand" href="./index.html">Metrix++</a>
- <div class="nav-collapse collapse">
- <ul class="nav">
- <li class="">
- <a href="./index.html">Home</a>
- </li>
- <li class="">
- <a href="./customize.html"><img src="http://sflogo.sourceforge.net/sflogo.php?group_id=275605&type=10" alt="Get Software Index at SourceForge.net. Fast, secure and Free Open Source software downloads" border="0"></a>
- </li>
- </ul>
- </div>
- </div>
- </div>
- </div>
- <!-- Subhead
- ================================================== -->
- <header class="jumbotron" id="overview">
- <div id="myCarousel" class="carousel slide">
- <div class="carousel-inner">
- <div class="item active">
- <img src="assets/img/slide-01.jpg" alt="">
- <div class="container">
- <div class="carousel-caption">
- <h2>Multiple languages</h2>
- <p class="lead">· C/C++, C# and Java.</p>
- <p class="lead">· Recognises classes, interfaces, namespaces, functions, comments, preprocessor and much more.</p>
- </div>
- </div>
- </div>
- <div class="item">
- <img src="assets/img/slide-02.jpg" alt="">
- <div class="container">
- <div class="carousel-caption">
- <h2>Multiple metrics</h2>
- <p class="lead">· Complexity, size and other.</p>
- </div>
- </div>
- </div>
- <div class="item">
- <img src="assets/img/slide-03.jpg" alt="">
- <div class="container">
- <div class="carousel-caption">
- <h2>High performance and scalability</h2>
- <p class="lead">· Applicable to huge code bases: thousands of files per minute.</p>
- <p class="lead">· Ultra-fast feedback on iterative re-run.</p>
- </div>
- </div>
- </div>
- <div class="item">
- <img src="assets/img/slide-01.jpg" alt="">
- <div class="container">
- <div class="carousel-caption">
- <h2>Effortless application to legacy code</h2>
- <p class="lead">· Recognises legacy, modified and new code.</p>
- <p class="lead">· Prevents from negative trends. Encourages positive.</p>
- </div>
- </div>
- </div>
- <div class="item">
- <img src="assets/img/slide-02.jpg" alt="">
- <div class="container">
- <div class="carousel-caption">
- <h2>Configurable</h2>
- <p class="lead">· Define and apply your rules and policies.</p>
- <p class="lead">· Integrate with your workflow.</p>
- </div>
- </div>
- </div>
- <div class="item">
- <img src="assets/img/slide-03.jpg" alt="">
- <div class="container">
- <div class="carousel-caption">
- <h2>Extendable via plugins</h2>
- <p class="lead">· Define your custom metric.</p>
- <p class="lead">· Add new language parser.</p>
- <p class="lead">· Create advanced post-analysis tool.</p>
- </div>
- </div>
- </div>
- </div>
- <a class="left carousel-control" href="#myCarousel" data-slide="prev">‹</a>
- <a class="right carousel-control" href="#myCarousel" data-slide="next">›</a>
- </div>
- <div class="container">
- <div class="row">
- <div class="span3">
- </div>
- <div class="span9">
- <h5 class="text-right">Management of source code quality is possible.</h5>
- <p class="text-right">
- <a href="https://sourceforge.net/projects/metrixplusplus/files/latest/download"
- ><button type="button"class="btn btn-danger">Download</button></a>
- <!--
- <button type="button"class="btn btn-warning">Donate</button>
- -->
- </p>
- </div>
- </div>
- </div>
- </header>
- <div class="container"><div class="row">
-
- <!-- Docs nav
- ================================================== -->
- <div class="span3 bs-docs-sidebar">
- <ul class="nav nav-list bs-docs-sidenav">
- <!--<li><img src="../../logo_project.png"/><p> </p></li>-->
- <li><a href="#overview_section"><i class="icon-chevron-right"></i> Overview</a></li>
- <li><a href="#download_section"><i class="icon-chevron-right"></i> Download & Install</a></li>
- <li><a href="#workflow_collect_section"><i class="icon-chevron-right"></i> Workflow: Collect data</a></li>
- <li><a href="#workflow_view_section"><i class="icon-chevron-right"></i> Workflow: View data</a></li>
- <li><a href="#workflow_view_distributions_section"><i class="icon-hand-right"></i> · distributions</a></li>
- <li><a href="#workflow_view_details_section"><i class="icon-hand-right"></i> · details</a></li>
- <li><a href="#workflow_limit_section"><i class="icon-chevron-right"></i> Workflow: Apply thresholds</a></li>
- <li><a href="#workflow_limit_hotspots_section"><i class="icon-hand-right"></i> · hotspots</a></li>
- <li><a href="#workflow_limit_suppress_section"><i class="icon-hand-right"></i> · suppressions</a></li>
- <li><a href="#extend_section"><i class="icon-chevron-right"></i> Create plugin</a></li>
- <li><a href="#contribute_section"><i class="icon-chevron-right"></i> Feedback & Contribute</a></li>
- </ul>
- </div>
-
- <!-- Sections
- ================================================== -->
- <div class="span9">
- <!-- Overview
- ================================================== -->
- <section id="overview_section">
- <div class="page-header">
- <h1>Overview</h1>
- </div>
- <h3>Highlights</h3>
- <p>Metrix++ is a tool to collect and analyse code metrics. Any metric is useless if it is not used.
- Metrix++ offers great usage capabilities and assists with variety of application use cases:</p>
- <ul>
- <li>Monitoring trends on <strong>daily</strong> basis. In order to take actions or make right decisions earlier.</li>
- <li>Enforcing trends on <strong>hourly</strong> basis, at every commit of code changes. In order to control quality in time, i.e. when it is not too late to redo.</li>
- <li>Assisiting on <strong>per minute</strong> basis during code refactoring and code development, where coding and quality standards matter.</li>
- </ul>
- <p>The workflow sections explain basic application principles.</p>
- <h3>Languages supported</h3>
- <p>The tool can parse C/C++, C# and Java source code files. The parser identifies certain regions in the code,
- such as classes, functions, namespaces, interfaces, etc. It obviously detects comments, strings and code for preprocessor.
- The identified regions form a tree of nested source code blocks, which are refered after and additionally scanned by metrics plugins.
- This concept allows to attribute metrics per regions, what gives fine grained data and rich input to analysis tools.
- The following example demonstrates this.</p>
-
- <table class="table">
- <thead>
- <tr>
- <th>Source code</th>
- <th>Regions tree [type: name: content type]</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td>
- <pre class="prettyprint linenums">
- // simple C++ code
- #include <myapi.h>
- // I explain the following class
- class MyClass {
- public:
- int m_var; // some member
- // I explain the following function
- MyClass(): m_var(0) {
- char str[] = "unused string"
-
- // nested region for good measure
- struct MyStruct {};
- }
-
- // Do not judge ugly code below
- #define get_max(a,b) ((a)>(b)?(a):(b))
- set_max(int b) {
- m_var = get_max(m_var, b);
- }
- };
- // this is the last line
- </pre>
- </td>
- <td>
- <pre class="prettyprint linenums">
- file: __global__: comment
- file: __global__: code
- file: __global__: preprocessor
- file: __global__: code
- class: MyClass: comment
- class: MyClass: code
- class: MyClass: code
- class: MyClass: code, comment
- class: MyClass: code
- function: MyClass: comment
- function: MyClass: code
- function: MyClass: code, string
- function: MyClass: code
- struct: MyStruct: comment
- struct: MyStruct: code
- function: MyClass: code
- class: MyClass: code
- function: set_max: comment
- function: set_max: preprocessor
- function: set_max: code
- function: set_max: code
- function: set_max: code
- class: MyClass: code
- file: __global__: comment
- </pre>
- </td>
- </tr>
- </tbody>
- </table>
- <h3>Metrics</h3>
- <p>Metrics highlighed in blue are <strong>per file</strong> metrics. Other metrics are <strong>per region</strong> metrics.
- Region term is explained in the previous chapter.</p>
- <table class="table table-bordered">
- <thead>
- <tr>
- <th>Metric (enable option)</th>
- <th>Brief description</th>
- <th>Motivation</th>
- </tr>
- </thead>
- <tbody>
- <tr class="info">
- <td>std.general.size</td>
- <td>Size of a file in bytes.</td>
- <td rowspan="4"><ul><li>Monitoring growth of source code base.</li>
- <li>Normalizing other metrics.</li>
- <li>Preventing large files and regions (large things difficult to maintain).</li>
- <li>Predicting delivery dates by comparing S-shaped code base growth / change curves.</li></ul></td>
- </tr>
- <tr>
- <td>std.code.length.total</td>
- <td>The same as 'std.general.size' metric, but attributed to code regions.</td>
- <td></td>
- </tr>
- <tr>
- <td>std.code.lines.total</td>
- <td>Number of non-blank lines of code of any content type (exectuable, comments, etc.)</td>
- <td></td>
- </tr>
- <tr>
- <td>std.code.lines.code</td>
- <td>Number of non-blank lines of code excluding preprocessor, comments and strings.</td>
- <td></td>
- </tr>
- <tr>
- <td>std.code.lines.preprocessor</td>
- <td>Number of non-blank lines of preprocessor code.</td>
- <td><ul><li>Enforcing localisation of preprocessor code in a single place.</li>
- <li>Encouraging usage of safer code structures instead of preprocessor.</li></ul></td>
- </tr>
- <tr>
- <td>std.code.lines.comments</td>
- <td>Number of non-blank lines of comments.</td>
- <td><ul><li>Low number of comments may indicate about maintainability problems.</li></ul></td>
- </tr>
- <tr>
- <td>std.code.complexity.cyclomatic</td>
- <td>McCabe cyclomatic complexity metric.</td>
- <td><ul><li>Identification of highly complex code for review and refactoring.</li>
- <li>Preventing complex functions (complexity is a reason of many defects and a reason of expensive maintaintenance).</li></ul></td>
- </tr>
- <tr>
- <td>std.suppress</td>
- <td>An option enables collection of Metrix++ suppressions and 2 metrics: 'std.suppress:count' and
- 'std.suppress.file:count'. The first is number of suppressions per region.
- The second is the same but applies for file-scope metrics.</td>
- <td><ul><li>Suppressing false-positives.</li>
- <li>Managing the amount of suppressions. Usually there are no false-positives to suppress with the right metric,
- but could be exceptions in specific cases. Managing suppressions is about managing exceptions.
- If there are many exceptional cases, maybe something is wrong with a metric or an application of a metric.</li></ul></td>
- </tr>
- <tr class="info">
- <td>std.general.procerrors</td>
- <td>Number of errors detected by Metrix++ code parser.
- Errors, like mismatched brackets, may result in bad identification of regions.</td>
- <td><ul><li>Cleaning up errors to ensure reliable code scanning.</li></ul></td>
- </tr>
- <tr class="info">
- <td>std.general.proctime</td>
- <td>Seconds spent on processing a file.</td>
- <td><ul><li>Monitor and profile tool's performance.</li></ul></td>
- </tr>
- </tbody>
- </table>
- </section>
- <section id="download_section">
- <div class="page-header">
- <h1>Download & Install</h1>
- </div>
- <p>In order to get the tool working, <a href="https://sourceforge.net/projects/metrixplusplus/files/latest/download">dowload the archive</a> with the latest stable version
- and unpack it to some folder. First run of the tool will trigger the installation within the folder,
- where it was launched.</p>
- <p>Corresponding checkout from the <a href="https://sourceforge.net/p/metrixplusplus/code">version control system</a> is the following:</p>
- <pre>svn checkout <a href="https://sourceforge.net/p/metrixplusplus/code">svn://svn.code.sf.net/p/metrixplusplus/code</a>/releases/latest Metrix++</pre>
- <p>In order to checkout the latest version under development, use this command:</p>
- <pre>svn checkout <a href="https://sourceforge.net/p/metrixplusplus/code">svn://svn.code.sf.net/p/metrixplusplus/code</a>/mainline Metrix++</pre>
- <h4>Prerequisites</h4>
- <p>Python Runtime Environment (version 2.7.* or later, version 3.* has not been tested)</p>
- <h4>License</h4>
- <p>This program is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the
- Free Software Foundation; version 3 of the License.</p>
- <p>This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
- without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- See the GNU General Public License for more details.</p>
- <p>You should have received a copy of the GNU General Public License along with the Metrix++;
- if not, contact <a href="mailto:avkonst@users.sourceforge.net?subject=Metrix%2B%2B License">Project Administrator</a></p>
-
- </section>
- <div class="page-header">
- <h1>Workflow</h1>
- </div>
- <section id="workflow_collect_section">
- <h2>Collect data</h2>
- <p>...</p>
- </section>
- <section id="workflow_view_section">
- <h2>View data</h2>
- <p>...</p>
- </section>
- <section id="workflow_limit_section">
- <h2>Apply thresholds</h2>
- <p>...</p>
- </section>
- <section id="workflow_limit_suppress_section">
- <h3>Suppressions</h3>
- <p>Metrix++ has got suppressions capability. Suppressions are collected from comments in code
- and used by post-processing tools, like 'limit'. It allows to take fine grained control
- over false-positive warnings, if there are.</p>
- </section>
- <section id="extend_section">
- <div class="page-header">
- <h1>Create plugin</h1>
- </div>
- <h2>New metric</h2>
- <p>describe METRIXPLUSPLUS_PATH environment variable</p>
- <h2>New language</h2>
- <p>...</p>
- <h2>New analysis tool</h2>
- <p>...</p>
- </section>
- <section id="contribute_section">
- <div class="page-header">
- <h1>Feeback and contribute</h1>
- </div>
- <h2>Feedback</h2>
- <p>...</p>
- </section>
- </div> <!-- end for sections -->
- </div></div> <!-- end for row and container -->
- <!-- Footer
- ================================================== -->
- <footer class="footer">
- <div class="container">
- <p>Copyright <strong>©</strong> 2009 - 2013, <a href="mailto:avkonst@users.sourceforge.net"><span class="normalImportance">Metrix++</span> Project</a></p>
- <p>Code licensed under <a href="http://www.gnu.org/licenses/gpl.txt" target="_blank">GPL 3.0</a>, documentation under <a href="http://creativecommons.org/licenses/by/3.0/">CC BY 3.0</a>.</p>
- <ul class="footer-links">
- <li><a href="#">Report defect</a></li>
- <li class="muted">·</li>
- <li><a href="#">Feature request</a></li>
- <li class="muted">·</li>
- <li><a href="#">Known issues</a></li>
- <li class="muted">·</li>
- <li><a href="#">Changelog</a></li>
- </ul>
- </div>
- </footer>
- <!-- Le javascript
- ================================================== -->
- <!-- Placed at the end of the document so the pages load faster -->
- <script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
- <script src="assets/js/jquery.js"></script>
- <script src="assets/js/bootstrap-transition.js"></script>
- <script src="assets/js/bootstrap-alert.js"></script>
- <script src="assets/js/bootstrap-modal.js"></script>
- <script src="assets/js/bootstrap-dropdown.js"></script>
- <script src="assets/js/bootstrap-scrollspy.js"></script>
- <script src="assets/js/bootstrap-tab.js"></script>
- <script src="assets/js/bootstrap-tooltip.js"></script>
- <script src="assets/js/bootstrap-popover.js"></script>
- <script src="assets/js/bootstrap-button.js"></script>
- <script src="assets/js/bootstrap-collapse.js"></script>
- <script src="assets/js/bootstrap-carousel.js"></script>
- <script src="assets/js/bootstrap-typeahead.js"></script>
- <script src="assets/js/bootstrap-affix.js"></script>
- <script>
- !function ($) {
- $(function(){
- // carousel demo
- $('#myCarousel').carousel()
- })
- }(window.jQuery)
- </script>
- <script src="assets/js/holder/holder.js"></script>
- <script src="assets/js/google-code-prettify/prettify.js"></script>
- <script src="assets/js/application.js"></script>
- <!-- Analytics
- ================================================== -->
- <!--
- <script>
- var _gauges = _gauges || [];
- (function() {
- var t = document.createElement('script');
- t.type = 'text/javascript';
- t.async = true;
- t.id = 'gauges-tracker';
- t.setAttribute('data-site-id', '4f0dc9fef5a1f55508000013');
- t.src = '//secure.gaug.es/track.js';
- var s = document.getElementsByTagName('script')[0];
- s.parentNode.insertBefore(t, s);
- })();
- </script>
- -->
- </body>
- </html>
|