home.html 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>Metrix++ Project</title>
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7. <meta name="description" content="">
  8. <meta name="author" content="">
  9. <!-- Le styles -->
  10. <!--
  11. <link href="../../style.css" rel="stylesheet">
  12. -->
  13. <link href="assets/css/bootstrap.css" rel="stylesheet">
  14. <link href="assets/css/bootstrap-responsive.css" rel="stylesheet">
  15. <link href="assets/css/docs.css" rel="stylesheet">
  16. <link href="assets/js/google-code-prettify/prettify.css" rel="stylesheet">
  17. <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
  18. <!--[if lt IE 9]>
  19. <script src="assets/js/html5shiv.js"></script>
  20. <![endif]-->
  21. <!-- Le fav and touch icons -->
  22. <link rel="apple-touch-icon-precomposed" sizes="144x144" href="assets/ico/apple-touch-icon-144-precomposed.png">
  23. <link rel="apple-touch-icon-precomposed" sizes="114x114" href="assets/ico/apple-touch-icon-114-precomposed.png">
  24. <link rel="apple-touch-icon-precomposed" sizes="72x72" href="assets/ico/apple-touch-icon-72-precomposed.png">
  25. <link rel="apple-touch-icon-precomposed" href="assets/ico/apple-touch-icon-57-precomposed.png">
  26. <link rel="shortcut icon" href="assets/ico/favicon.png">
  27. <!--
  28. <script type="text/javascript">
  29. var _gaq = _gaq || [];
  30. _gaq.push(['_setAccount', 'UA-146052-10']);
  31. _gaq.push(['_trackPageview']);
  32. (function() {
  33. var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
  34. ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
  35. var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  36. })();
  37. </script>
  38. -->
  39. </head>
  40. <body data-spy="scroll" data-target=".bs-docs-sidebar">
  41. <!-- Navbar
  42. ================================================== -->
  43. <div class="navbar navbar-link navbar-fixed-top">
  44. <div class="navbar-inner">
  45. <div class="container">
  46. <button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
  47. <span class="icon-bar"></span>
  48. <span class="icon-bar"></span>
  49. <span class="icon-bar"></span>
  50. </button>
  51. <a class="brand" href="./index.html">Metrix++</a>
  52. <div class="nav-collapse collapse">
  53. <ul class="nav">
  54. <li class="">
  55. <a href="./index.html">Home</a>
  56. </li>
  57. <li class="">
  58. <a href="./customize.html"><img src="http://sflogo.sourceforge.net/sflogo.php?group_id=275605&amp;type=10" alt="Get Software Index at SourceForge.net. Fast, secure and Free Open Source software downloads" border="0"></a>
  59. </li>
  60. </ul>
  61. </div>
  62. </div>
  63. </div>
  64. </div>
  65. <!-- Subhead
  66. ================================================== -->
  67. <header class="jumbotron" id="overview">
  68. <div id="myCarousel" class="carousel slide">
  69. <div class="carousel-inner">
  70. <div class="item active">
  71. <img src="assets/img/slide-01.jpg" alt="">
  72. <div class="container">
  73. <div class="carousel-caption">
  74. <h2>Multiple languages</h2>
  75. <p class="lead">&middot; C/C++, C# and Java.</p>
  76. <p class="lead">&middot; Recognises classes, interfaces, namespaces, functions, comments, preprocessor and much more.</p>
  77. </div>
  78. </div>
  79. </div>
  80. <div class="item">
  81. <img src="assets/img/slide-02.jpg" alt="">
  82. <div class="container">
  83. <div class="carousel-caption">
  84. <h2>Multiple metrics</h2>
  85. <p class="lead">&middot; Complexity, size and other.</p>
  86. </div>
  87. </div>
  88. </div>
  89. <div class="item">
  90. <img src="assets/img/slide-03.jpg" alt="">
  91. <div class="container">
  92. <div class="carousel-caption">
  93. <h2>High performance and scalability</h2>
  94. <p class="lead">&middot; Applicable to huge code bases: thousands of files per minute.</p>
  95. <p class="lead">&middot; Ultra-fast feedback on iterative re-run.</p>
  96. </div>
  97. </div>
  98. </div>
  99. <div class="item">
  100. <img src="assets/img/slide-01.jpg" alt="">
  101. <div class="container">
  102. <div class="carousel-caption">
  103. <h2>Effortless application to legacy code</h2>
  104. <p class="lead">&middot; Recognises legacy, modified and new code.</p>
  105. <p class="lead">&middot; Prevents from negative trends. Encourages positive.</p>
  106. </div>
  107. </div>
  108. </div>
  109. <div class="item">
  110. <img src="assets/img/slide-02.jpg" alt="">
  111. <div class="container">
  112. <div class="carousel-caption">
  113. <h2>Configurable</h2>
  114. <p class="lead">&middot; Define and apply your rules and policies.</p>
  115. <p class="lead">&middot; Integrate with your workflow.</p>
  116. </div>
  117. </div>
  118. </div>
  119. <div class="item">
  120. <img src="assets/img/slide-03.jpg" alt="">
  121. <div class="container">
  122. <div class="carousel-caption">
  123. <h2>Extendable via plugins</h2>
  124. <p class="lead">&middot; Define your custom metric.</p>
  125. <p class="lead">&middot; Add new language parser.</p>
  126. <p class="lead">&middot; Create advanced post-analysis tool.</p>
  127. </div>
  128. </div>
  129. </div>
  130. </div>
  131. <a class="left carousel-control" href="#myCarousel" data-slide="prev">&lsaquo;</a>
  132. <a class="right carousel-control" href="#myCarousel" data-slide="next">&rsaquo;</a>
  133. </div>
  134. <div class="container">
  135. <div class="row">
  136. <div class="span3">
  137. </div>
  138. <div class="span9">
  139. <h5 class="text-right">Management of source code quality is possible.</h5>
  140. <p class="text-right">
  141. <a href="https://sourceforge.net/projects/metrixplusplus/files/latest/download"
  142. ><button type="button"class="btn btn-danger">Download</button></a>
  143. <!--
  144. <button type="button"class="btn btn-warning">Donate</button>
  145. -->
  146. </p>
  147. </div>
  148. </div>
  149. </div>
  150. </header>
  151. <div class="container"><div class="row">
  152. <!-- Docs nav
  153. ================================================== -->
  154. <div class="span3 bs-docs-sidebar">
  155. <ul class="nav nav-list bs-docs-sidenav">
  156. <!--<li><img src="../../logo_project.png"/><p>&nbsp;</p></li>-->
  157. <li><a href="#overview_section"><i class="icon-chevron-right"></i> Overview</a></li>
  158. <li><a href="#download_section"><i class="icon-chevron-right"></i> Download &amp; Install</a></li>
  159. <li><a href="#workflow_collect_section"><i class="icon-chevron-right"></i> Workflow: Collect data</a></li>
  160. <li><a href="#workflow_view_section"><i class="icon-chevron-right"></i> Workflow: View data</a></li>
  161. <li><a href="#workflow_view_distributions_section"><i class="icon-hand-right"></i> &middot; distributions</a></li>
  162. <li><a href="#workflow_view_details_section"><i class="icon-hand-right"></i> &middot; details</a></li>
  163. <li><a href="#workflow_limit_section"><i class="icon-chevron-right"></i> Workflow: Apply thresholds</a></li>
  164. <li><a href="#workflow_limit_hotspots_section"><i class="icon-hand-right"></i> &middot; hotspots</a></li>
  165. <li><a href="#workflow_limit_suppress_section"><i class="icon-hand-right"></i> &middot; suppressions</a></li>
  166. <li><a href="#extend_section"><i class="icon-chevron-right"></i> Create plugin</a></li>
  167. <li><a href="#contribute_section"><i class="icon-chevron-right"></i> Feedback &amp; Contribute</a></li>
  168. </ul>
  169. </div>
  170. <!-- Sections
  171. ================================================== -->
  172. <div class="span9">
  173. <!-- Overview
  174. ================================================== -->
  175. <section id="overview_section">
  176. <div class="page-header">
  177. <h1>Overview</h1>
  178. </div>
  179. <h3>Highlights</h3>
  180. <p>Metrix++ is a tool to collect and analyse code metrics. Any metric is useless if it is not used.
  181. Metrix++ offers great usage capabilities and assists with variety of application use cases:</p>
  182. <ul>
  183. <li>Monitoring trends on <strong>daily</strong> basis. In order to take actions or make right decisions earlier.</li>
  184. <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>
  185. <li>Assisiting on <strong>per minute</strong> basis during code refactoring and code development, where coding and quality standards matter.</li>
  186. </ul>
  187. <p>The workflow sections explain basic application principles.</p>
  188. <h3>Languages supported</h3>
  189. <p>The tool can parse C/C++, C# and Java source code files. The parser identifies certain regions in the code,
  190. such as classes, functions, namespaces, interfaces, etc. It obviously detects comments, strings and code for preprocessor.
  191. The identified regions form a tree of nested source code blocks, which are refered after and additionally scanned by metrics plugins.
  192. This concept allows to attribute metrics per regions, what gives fine grained data and rich input to analysis tools.
  193. The following example demonstrates this.</p>
  194. <table class="table">
  195. <thead>
  196. <tr>
  197. <th>Source code</th>
  198. <th>Regions tree [type: name: content type]</th>
  199. </tr>
  200. </thead>
  201. <tbody>
  202. <tr>
  203. <td>
  204. <pre class="prettyprint linenums">
  205. // simple C++ code
  206. #include &lt;myapi.h&gt;
  207. // I explain the following class
  208. class MyClass {
  209. public:
  210. int m_var; // some member
  211. // I explain the following function
  212. MyClass(): m_var(0) {
  213. char str[] = "unused string"
  214. // nested region for good measure
  215. struct MyStruct {};
  216. }
  217. // Do not judge ugly code below
  218. #define get_max(a,b) ((a)>(b)?(a):(b))
  219. set_max(int b) {
  220. m_var = get_max(m_var, b);
  221. }
  222. };
  223. // this is the last line
  224. </pre>
  225. </td>
  226. <td>
  227. <pre class="prettyprint linenums">
  228. file: __global__: comment
  229. file: __global__: code
  230. file: __global__: preprocessor
  231. file: __global__: code
  232. class: MyClass: comment
  233. class: MyClass: code
  234. class: MyClass: code
  235. class: MyClass: code, comment
  236. class: MyClass: code
  237. function: MyClass: comment
  238. function: MyClass: code
  239. function: MyClass: code, string
  240. function: MyClass: code
  241. struct: MyStruct: comment
  242. struct: MyStruct: code
  243. function: MyClass: code
  244. class: MyClass: code
  245. function: set_max: comment
  246. function: set_max: preprocessor
  247. function: set_max: code
  248. function: set_max: code
  249. function: set_max: code
  250. class: MyClass: code
  251. file: __global__: comment
  252. </pre>
  253. </td>
  254. </tr>
  255. </tbody>
  256. </table>
  257. <h3>Metrics</h3>
  258. <p>Metrics highlighed in blue are <strong>per file</strong> metrics. Other metrics are <strong>per region</strong> metrics.
  259. Region term is explained in the previous chapter.</p>
  260. <table class="table table-bordered">
  261. <thead>
  262. <tr>
  263. <th>Metric (enable option)</th>
  264. <th>Brief description</th>
  265. <th>Motivation</th>
  266. </tr>
  267. </thead>
  268. <tbody>
  269. <tr class="info">
  270. <td>std.general.size</td>
  271. <td>Size of a file in bytes.</td>
  272. <td rowspan="4"><ul><li>Monitoring growth of source code base.</li>
  273. <li>Normalizing other metrics.</li>
  274. <li>Preventing large files and regions (large things difficult to maintain).</li>
  275. <li>Predicting delivery dates by comparing S-shaped code base growth / change curves.</li></ul></td>
  276. </tr>
  277. <tr>
  278. <td>std.code.length.total</td>
  279. <td>The same as 'std.general.size' metric, but attributed to code regions.</td>
  280. <td></td>
  281. </tr>
  282. <tr>
  283. <td>std.code.lines.total</td>
  284. <td>Number of non-blank lines of code of any content type (exectuable, comments, etc.)</td>
  285. <td></td>
  286. </tr>
  287. <tr>
  288. <td>std.code.lines.code</td>
  289. <td>Number of non-blank lines of code excluding preprocessor, comments and strings.</td>
  290. <td></td>
  291. </tr>
  292. <tr>
  293. <td>std.code.lines.preprocessor</td>
  294. <td>Number of non-blank lines of preprocessor code.</td>
  295. <td><ul><li>Enforcing localisation of preprocessor code in a single place.</li>
  296. <li>Encouraging usage of safer code structures instead of preprocessor.</li></ul></td>
  297. </tr>
  298. <tr>
  299. <td>std.code.lines.comments</td>
  300. <td>Number of non-blank lines of comments.</td>
  301. <td><ul><li>Low number of comments may indicate about maintainability problems.</li></ul></td>
  302. </tr>
  303. <tr>
  304. <td>std.code.complexity.cyclomatic</td>
  305. <td>McCabe cyclomatic complexity metric.</td>
  306. <td><ul><li>Identification of highly complex code for review and refactoring.</li>
  307. <li>Preventing complex functions (complexity is a reason of many defects and a reason of expensive maintaintenance).</li></ul></td>
  308. </tr>
  309. <tr>
  310. <td>std.suppress</td>
  311. <td>An option enables collection of Metrix++ suppressions and 2 metrics: 'std.suppress:count' and
  312. 'std.suppress.file:count'. The first is number of suppressions per region.
  313. The second is the same but applies for file-scope metrics.</td>
  314. <td><ul><li>Suppressing false-positives.</li>
  315. <li>Managing the amount of suppressions. Usually there are no false-positives to suppress with the right metric,
  316. but could be exceptions in specific cases. Managing suppressions is about managing exceptions.
  317. If there are many exceptional cases, maybe something is wrong with a metric or an application of a metric.</li></ul></td>
  318. </tr>
  319. <tr class="info">
  320. <td>std.general.procerrors</td>
  321. <td>Number of errors detected by Metrix++ code parser.
  322. Errors, like mismatched brackets, may result in bad identification of regions.</td>
  323. <td><ul><li>Cleaning up errors to ensure reliable code scanning.</li></ul></td>
  324. </tr>
  325. <tr class="info">
  326. <td>std.general.proctime</td>
  327. <td>Seconds spent on processing a file.</td>
  328. <td><ul><li>Monitor and profile tool's performance.</li></ul></td>
  329. </tr>
  330. </tbody>
  331. </table>
  332. </section>
  333. <section id="download_section">
  334. <div class="page-header">
  335. <h1>Download &amp; Install</h1>
  336. </div>
  337. <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
  338. and unpack it to some folder. First run of the tool will trigger the installation within the folder,
  339. where it was launched.</p>
  340. <p>Corresponding checkout from the <a href="https://sourceforge.net/p/metrixplusplus/code">version control system</a> is the following:</p>
  341. <pre>svn checkout <a href="https://sourceforge.net/p/metrixplusplus/code">svn://svn.code.sf.net/p/metrixplusplus/code</a>/releases/latest Metrix++</pre>
  342. <p>In order to checkout the latest version under development, use this command:</p>
  343. <pre>svn checkout <a href="https://sourceforge.net/p/metrixplusplus/code">svn://svn.code.sf.net/p/metrixplusplus/code</a>/mainline Metrix++</pre>
  344. <h4>Prerequisites</h4>
  345. <p>Python Runtime Environment (version 2.7.* or later, version 3.* has not been tested)</p>
  346. <h4>License</h4>
  347. <p>This program is free software; you can redistribute it and/or modify it
  348. under the terms of the GNU General Public License as published by the
  349. Free Software Foundation; version 3 of the License.</p>
  350. <p>This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
  351. without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  352. See the GNU General Public License for more details.</p>
  353. <p>You should have received a copy of the GNU General Public License along with the Metrix++;
  354. if not, contact <a href="mailto:avkonst@users.sourceforge.net?subject=Metrix%2B%2B License">Project Administrator</a></p>
  355. </section>
  356. <div class="page-header">
  357. <h1>Workflow</h1>
  358. </div>
  359. <section id="workflow_collect_section">
  360. <h2>Collect data</h2>
  361. <p>...</p>
  362. </section>
  363. <section id="workflow_view_section">
  364. <h2>View data</h2>
  365. <p>...</p>
  366. </section>
  367. <section id="workflow_limit_section">
  368. <h2>Apply thresholds</h2>
  369. <p>...</p>
  370. </section>
  371. <section id="workflow_limit_suppress_section">
  372. <h3>Suppressions</h3>
  373. <p>Metrix++ has got suppressions capability. Suppressions are collected from comments in code
  374. and used by post-processing tools, like 'limit'. It allows to take fine grained control
  375. over false-positive warnings, if there are.</p>
  376. </section>
  377. <section id="extend_section">
  378. <div class="page-header">
  379. <h1>Create plugin</h1>
  380. </div>
  381. <h2>New metric</h2>
  382. <p>describe METRIXPLUSPLUS_PATH environment variable</p>
  383. <h2>New language</h2>
  384. <p>...</p>
  385. <h2>New analysis tool</h2>
  386. <p>...</p>
  387. </section>
  388. <section id="contribute_section">
  389. <div class="page-header">
  390. <h1>Feeback and contribute</h1>
  391. </div>
  392. <h2>Feedback</h2>
  393. <p>...</p>
  394. </section>
  395. </div> <!-- end for sections -->
  396. </div></div> <!-- end for row and container -->
  397. <!-- Footer
  398. ================================================== -->
  399. <footer class="footer">
  400. <div class="container">
  401. <p>Copyright <strong>&copy;</strong> 2009 - 2013, <a href="mailto:avkonst@users.sourceforge.net"><span class="normalImportance">Metrix++</span> Project</a></p>
  402. <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>
  403. <ul class="footer-links">
  404. <li><a href="#">Report defect</a></li>
  405. <li class="muted">&middot;</li>
  406. <li><a href="#">Feature request</a></li>
  407. <li class="muted">&middot;</li>
  408. <li><a href="#">Known issues</a></li>
  409. <li class="muted">&middot;</li>
  410. <li><a href="#">Changelog</a></li>
  411. </ul>
  412. </div>
  413. </footer>
  414. <!-- Le javascript
  415. ================================================== -->
  416. <!-- Placed at the end of the document so the pages load faster -->
  417. <script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
  418. <script src="assets/js/jquery.js"></script>
  419. <script src="assets/js/bootstrap-transition.js"></script>
  420. <script src="assets/js/bootstrap-alert.js"></script>
  421. <script src="assets/js/bootstrap-modal.js"></script>
  422. <script src="assets/js/bootstrap-dropdown.js"></script>
  423. <script src="assets/js/bootstrap-scrollspy.js"></script>
  424. <script src="assets/js/bootstrap-tab.js"></script>
  425. <script src="assets/js/bootstrap-tooltip.js"></script>
  426. <script src="assets/js/bootstrap-popover.js"></script>
  427. <script src="assets/js/bootstrap-button.js"></script>
  428. <script src="assets/js/bootstrap-collapse.js"></script>
  429. <script src="assets/js/bootstrap-carousel.js"></script>
  430. <script src="assets/js/bootstrap-typeahead.js"></script>
  431. <script src="assets/js/bootstrap-affix.js"></script>
  432. <script>
  433. !function ($) {
  434. $(function(){
  435. // carousel demo
  436. $('#myCarousel').carousel()
  437. })
  438. }(window.jQuery)
  439. </script>
  440. <script src="assets/js/holder/holder.js"></script>
  441. <script src="assets/js/google-code-prettify/prettify.js"></script>
  442. <script src="assets/js/application.js"></script>
  443. <!-- Analytics
  444. ================================================== -->
  445. <!--
  446. <script>
  447. var _gauges = _gauges || [];
  448. (function() {
  449. var t = document.createElement('script');
  450. t.type = 'text/javascript';
  451. t.async = true;
  452. t.id = 'gauges-tracker';
  453. t.setAttribute('data-site-id', '4f0dc9fef5a1f55508000013');
  454. t.src = '//secure.gaug.es/track.js';
  455. var s = document.getElementsByTagName('script')[0];
  456. s.parentNode.insertBefore(t, s);
  457. })();
  458. </script>
  459. -->
  460. </body>
  461. </html>