home.html 49 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049
  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. </ul>
  58. </div>
  59. </div>
  60. </div>
  61. </div>
  62. <!-- Subhead
  63. ================================================== -->
  64. <header class="jumbotron" id="overview">
  65. <div id="myCarousel" class="carousel slide">
  66. <div class="carousel-inner">
  67. <div class="item active">
  68. <img src="assets/img/slide-01.jpg" alt="">
  69. <div class="container">
  70. <div class="carousel-caption">
  71. <h2>Multiple languages</h2>
  72. <p class="lead">&middot; C/C++, C# and Java.</p>
  73. <p class="lead">&middot; Recognises classes, interfaces, namespaces, functions, comments, preprocessor and much more.</p>
  74. </div>
  75. </div>
  76. </div>
  77. <div class="item">
  78. <img src="assets/img/slide-02.jpg" alt="">
  79. <div class="container">
  80. <div class="carousel-caption">
  81. <h2>Multiple metrics</h2>
  82. <p class="lead">&middot; Complexity, size and other.</p>
  83. </div>
  84. </div>
  85. </div>
  86. <div class="item">
  87. <img src="assets/img/slide-03.jpg" alt="">
  88. <div class="container">
  89. <div class="carousel-caption">
  90. <h2>High performance and scalability</h2>
  91. <p class="lead">&middot; Applicable to huge code bases: thousands of files per minute.</p>
  92. <p class="lead">&middot; Ultra-fast feedback on iterative re-run.</p>
  93. </div>
  94. </div>
  95. </div>
  96. <div class="item">
  97. <img src="assets/img/slide-01.jpg" alt="">
  98. <div class="container">
  99. <div class="carousel-caption">
  100. <h2>Effortless application to legacy code</h2>
  101. <p class="lead">&middot; Recognises legacy, modified and new code.</p>
  102. <p class="lead">&middot; Prevents from negative trends. Encourages positive.</p>
  103. </div>
  104. </div>
  105. </div>
  106. <div class="item">
  107. <img src="assets/img/slide-02.jpg" alt="">
  108. <div class="container">
  109. <div class="carousel-caption">
  110. <h2>Configurable</h2>
  111. <p class="lead">&middot; Define and apply your rules and policies.</p>
  112. <p class="lead">&middot; Integrate with your workflow.</p>
  113. </div>
  114. </div>
  115. </div>
  116. <div class="item">
  117. <img src="assets/img/slide-03.jpg" alt="">
  118. <div class="container">
  119. <div class="carousel-caption">
  120. <h2>Extendable via plugins</h2>
  121. <p class="lead">&middot; Define your custom metric.</p>
  122. <p class="lead">&middot; Add new language parser.</p>
  123. <p class="lead">&middot; Create advanced post-analysis tool.</p>
  124. </div>
  125. </div>
  126. </div>
  127. </div>
  128. <a class="left carousel-control" href="#myCarousel" data-slide="prev">&lsaquo;</a>
  129. <a class="right carousel-control" href="#myCarousel" data-slide="next">&rsaquo;</a>
  130. </div>
  131. <div class="container">
  132. <div class="row">
  133. <div class="span3">
  134. </div>
  135. <div class="span9">
  136. <h5 class="text-right">Management of source code quality is possible.</h5>
  137. <p class="text-right">
  138. <a href="https://sourceforge.net/projects/metrixplusplus/files/latest/download"
  139. ><button type="button"class="btn btn-danger">Download</button></a>
  140. <!--
  141. <button type="button"class="btn btn-warning">Donate</button>
  142. -->
  143. </p>
  144. </div>
  145. </div>
  146. </div>
  147. </header>
  148. <div class="container"><div class="row">
  149. <!-- Docs nav
  150. ================================================== -->
  151. <div class="span3 bs-docs-sidebar">
  152. <ul class="nav nav-list bs-docs-sidenav">
  153. <!--<li><img src="../../logo_project.png"/><p>&nbsp;</p></li>-->
  154. <li><a href="#overview_section"><i class="icon-chevron-right"></i> Overview</a></li>
  155. <li><a href="#download_section"><i class="icon-chevron-right"></i> Download &amp; Install</a></li>
  156. <li><a href="#workflow_collect_section"><i class="icon-chevron-right"></i> Workflow: Collect data</a></li>
  157. <li><a href="#workflow_view_section"><i class="icon-chevron-right"></i> Workflow: View data</a></li>
  158. <li><a href="#workflow_view_summary_section"><i class="icon-hand-right"></i> &middot; summary &amp; distributions</a></li>
  159. <li><a href="#workflow_view_details_section"><i class="icon-hand-right"></i> &middot; details per file/region</a></li>
  160. <li><a href="#workflow_limit_section"><i class="icon-chevron-right"></i> Workflow: Apply thresholds</a></li>
  161. <li><a href="#workflow_limit_hotspots_section"><i class="icon-hand-right"></i> &middot; hotspots</a></li>
  162. <li><a href="#workflow_limit_control_section"><i class="icon-hand-right"></i> &middot; controlling trends</a></li>
  163. <li><a href="#workflow_other_section"><i class="icon-chevron-right"></i> Workflow: Other applications</a></li>
  164. <li><a href="#extend_section"><i class="icon-chevron-right"></i> Create plugin</a></li>
  165. <li><a href="#contribute_section"><i class="icon-chevron-right"></i> Feedback &amp; Contribute</a></li>
  166. </ul>
  167. </div>
  168. <!-- Sections
  169. ================================================== -->
  170. <div class="span9">
  171. <!-- Overview
  172. ================================================== -->
  173. <section id="overview_section">
  174. <div class="page-header">
  175. <h1>Overview</h1>
  176. </div>
  177. <h3>Highlights</h3>
  178. <p>Metrix++ is a tool to collect and analyse code metrics. Any metric is useless if it is not used.
  179. Metrix++ offers great usage capabilities and assists with variety of application use cases:</p>
  180. <ul>
  181. <li>Monitoring trends on <strong>daily</strong> basis. In order to take actions or make right decisions earlier.</li>
  182. <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>
  183. <li>Assisiting on <strong>per minute</strong> basis during code refactoring and code development, where coding and quality standards matter.</li>
  184. </ul>
  185. <p>The workflow sections below demonstarate basic application usecases.</p>
  186. <h3>Languages supported</h3>
  187. <p>The tool can parse C/C++, C# and Java source code files. The parser identifies certain regions in the code,
  188. such as classes, functions, namespaces, interfaces, etc. It obviously detects comments, strings and code for preprocessor.
  189. The identified regions form a tree of nested source code blocks, which are refered after and additionally scanned by metrics plugins.
  190. This concept allows to attribute metrics per regions, what gives fine grained data and rich input to analysis tools.
  191. The following example demonstrates regions concept.</p>
  192. <table class="table">
  193. <thead>
  194. <tr>
  195. <th>Source code</th>
  196. <th>Regions tree [type: name: content type]</th>
  197. </tr>
  198. </thead>
  199. <tbody>
  200. <tr>
  201. <td>
  202. <pre class="prettyprint linenums">
  203. // simple C++ code
  204. #include &lt;myapi.h&gt;
  205. // I explain the following class
  206. class MyClass {
  207. public:
  208. int m_var; // some member
  209. // I explain the following function
  210. MyClass(): m_var(0) {
  211. char str[] = "unused string"
  212. // nested region for good measure
  213. struct MyStruct {};
  214. }
  215. // Do not judge ugly code below
  216. #define get_max(a,b) ((a)>(b)?(a):(b))
  217. set_max(int b) {
  218. m_var = get_max(m_var, b);
  219. }
  220. };
  221. // this is the last line
  222. </pre>
  223. </td>
  224. <td>
  225. <pre class="prettyprint linenums">
  226. file: __global__: comment
  227. file: __global__: code
  228. file: __global__: preprocessor
  229. file: __global__: code
  230. class: MyClass: comment
  231. class: MyClass: code
  232. class: MyClass: code
  233. class: MyClass: code, comment
  234. class: MyClass: code
  235. function: MyClass: comment
  236. function: MyClass: code
  237. function: MyClass: code, string
  238. function: MyClass: code
  239. struct: MyStruct: comment
  240. struct: MyStruct: code
  241. function: MyClass: code
  242. class: MyClass: code
  243. function: set_max: comment
  244. function: set_max: preprocessor
  245. function: set_max: code
  246. function: set_max: code
  247. function: set_max: code
  248. class: MyClass: code
  249. file: __global__: comment
  250. </pre>
  251. </td>
  252. </tr>
  253. </tbody>
  254. </table>
  255. <h3>Metrics</h3>
  256. <p>Metrics highlighed in blue are <strong>per file</strong> metrics. Other metrics are <strong>per region</strong> metrics.
  257. Region term is explained in the previous chapter.</p>
  258. <table class="table table-bordered">
  259. <thead>
  260. <tr>
  261. <th>Metric (enable option)</th>
  262. <th>Brief description</th>
  263. <th>Motivation</th>
  264. </tr>
  265. </thead>
  266. <tbody>
  267. <tr class="info">
  268. <td>std.general.size</td>
  269. <td>Size of a file in bytes.</td>
  270. <td rowspan="4"><ul><li>Monitoring growth of source code base.</li>
  271. <li>Normalizing other metrics.</li>
  272. <li>Preventing large files and regions (large things difficult to maintain).</li>
  273. <li>Predicting delivery dates by comparing
  274. <a href="http://www.compaid.com/caiInternet/casestudies/kanarticle2.pdf">S-shaped code base growth / change curves</a>.</li></ul></td>
  275. </tr>
  276. <tr>
  277. <td>std.code.length.total</td>
  278. <td>The same as 'std.general.size' metric, but attributed to code regions.</td>
  279. <td></td>
  280. </tr>
  281. <tr>
  282. <td>std.code.lines.total</td>
  283. <td>Number of non-blank lines of code of any content type (exectuable, comments, etc.)</td>
  284. <td></td>
  285. </tr>
  286. <tr>
  287. <td>std.code.lines.code</td>
  288. <td>Number of non-blank lines of code excluding preprocessor and comments.</td>
  289. <td></td>
  290. </tr>
  291. <tr>
  292. <td>std.code.lines.preprocessor</td>
  293. <td>Number of non-blank lines of preprocessor code.</td>
  294. <td><ul><li>Enforcing localisation of preprocessor code in a single place.</li>
  295. <li>Encouraging usage of safer code structures instead of preprocessor.</li></ul></td>
  296. </tr>
  297. <tr>
  298. <td>std.code.lines.comments</td>
  299. <td>Number of non-blank lines of comments.</td>
  300. <td><ul><li>Low number of comments may indicate about maintainability problems.</li></ul></td>
  301. </tr>
  302. <tr>
  303. <td>std.code.complexity.cyclomatic</td>
  304. <td>McCabe cyclomatic complexity metric.</td>
  305. <td><ul><li>Identification of highly complex code for review and refactoring.</li>
  306. <li>Preventing complex functions (complexity is a reason of many defects and a reason of expensive maintaintenance).</li></ul></td>
  307. </tr>
  308. <tr>
  309. <td>std.suppress</td>
  310. <td>An option enables collection of Metrix++ suppressions and 2 metrics: 'std.suppress:count' and
  311. 'std.suppress.file:count'. The first is number of suppressions per region.
  312. The second is the same but applies for file-scope metrics.</td>
  313. <td><ul><li>Suppressing false-positives.</li>
  314. <li>Managing the amount of suppressions. Usually there are no false-positives to suppress with the right metric,
  315. but could be exceptions in specific cases. Managing suppressions is about managing exceptions.
  316. If there are many exceptional cases, maybe something is wrong with a metric or an application of a metric.</li></ul></td>
  317. </tr>
  318. <tr class="info">
  319. <td>std.general.procerrors</td>
  320. <td>Number of errors detected by Metrix++ code parser.
  321. Errors, like mismatched brackets, may result in bad identification of regions.</td>
  322. <td><ul><li>Cleaning up errors to ensure reliable code scanning.</li></ul></td>
  323. </tr>
  324. <tr class="info">
  325. <td>std.general.proctime</td>
  326. <td>Seconds spent on processing a file.</td>
  327. <td><ul><li>Monitor and profile tool's performance.</li></ul></td>
  328. </tr>
  329. </tbody>
  330. </table>
  331. </section>
  332. <section id="download_section">
  333. <div class="page-header">
  334. <h1>Download &amp; Install</h1>
  335. </div>
  336. <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
  337. and unpack it to some folder. First run of the tool will trigger the installation within the folder,
  338. where it was launched.</p>
  339. <p>Corresponding checkout from the <a href="https://sourceforge.net/p/metrixplusplus/code">version control system</a> is the following:</p>
  340. <pre>svn checkout <a href="https://sourceforge.net/p/metrixplusplus/code">svn://svn.code.sf.net/p/metrixplusplus/code</a>/releases/latest Metrix++</pre>
  341. <p>In order to checkout the latest version under development, use this command:</p>
  342. <pre>svn checkout <a href="https://sourceforge.net/p/metrixplusplus/code">svn://svn.code.sf.net/p/metrixplusplus/code</a>/mainline Metrix++</pre>
  343. <h4>Prerequisites</h4>
  344. <p>Python Runtime Environment (version 2.7.* or later, version 3.* has not been tested)</p>
  345. <h4>License</h4>
  346. <p>This program is free software; you can redistribute it and/or modify it
  347. under the terms of the GNU General Public License as published by the
  348. Free Software Foundation; version 3 of the License.</p>
  349. <p>This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
  350. without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  351. See the GNU General Public License for more details.</p>
  352. <p>You should have received a copy of the GNU General Public License along with the Metrix++;
  353. if not, contact <a href="mailto:avkonst@users.sourceforge.net?subject=Metrix%2B%2B License">Project Administrator</a></p>
  354. </section>
  355. <div class="page-header">
  356. <h1>Workflow</h1>
  357. </div>
  358. <p>The workflow and application usecases are demonstrated using source code of
  359. <a href="http://www.boost.org/doc/libs/1_54_0/doc/html/interprocess.html">boost/interprocess</a> library.
  360. Boost versions 1.52 and 1.54 are used and refered below as 'previous' and 'current' accordingly.</p>
  361. <section id="workflow_collect_section">
  362. <h2>Collect data</h2>
  363. <p>The first obvious step is to collect the data.
  364. The 'collect' tool has got multiple options to enable various metrics plugins.
  365. Let's collect number of lines of code and cyclomatic complexity metrics
  366. for the previous (1.52.0 version) boost interprocess library. Assuming that 2 versions of boost library
  367. are unpacked in the current working directory:</p>
  368. <pre>
  369. &gt; cd boost_1_52_0
  370. &gt; python "/path/to/metrix++.py" collect --std.code.lines.code --std.code.complexity.cyclomatic -- boost/interprocess
  371. &gt; cd ../ # return back to working directory
  372. </pre>
  373. <p>The list of arguments after '--' enumerates paths where to read source files.
  374. As a result of execution of this command, a file metrixpp.db will be written in the current working directory.
  375. It can be redefined with help of --db-file option.</p>
  376. <p>Metrix++ has got rich functionality in comparing code bases and reducing processing scope to modified or new code.
  377. So, let's collect the same data for the current (1.54.0 version) boost interprocess library.</p>
  378. <pre>
  379. &gt; cd boost_1_54_0
  380. &gt; python "/path/to/metrix++.py" collect --std.code.lines.code --std.code.complexity.cyclomatic -- boost/interprocess --db-file-prev=../boost_1_52_0/metrixpp.db
  381. &gt; cd ../ # return back to working directory
  382. </pre>
  383. <p>The option --db-file-prev points out to the file with data collected in the previous step.
  384. So, eventually it executed iterative collection. It can speed up the exectuion significantly,
  385. depending on amount of changes between two version.</p>
  386. <p>Check other options of the collect tool by executing:</p>
  387. <pre>
  388. &gt; python "/path/to/metrix++.py" collect --help
  389. </pre>
  390. </section>
  391. <section id="workflow_view_section">
  392. <h2>View data</h2>
  393. </section>
  394. <section id="workflow_view_summary_section">
  395. <h3>Summary metrics and distribution tables/graphs</h3>
  396. <p>It is time to look at the data files collected (step above). The command:</p>
  397. <pre>
  398. &gt; python "/path/to/metrix++.py" view --db-file=boost_1_54_0/metrixpp.db
  399. </pre>
  400. <p>prints summary metrics, like minimum/maximum, and distribution/frequency tables:</p>
  401. <pre>
  402. :: info: Overall metrics for 'std.code.complexity:cyclomatic' metric
  403. Average : 0.652902698283
  404. Minimum : 0
  405. Maximum : 37
  406. Total : 1597.0
  407. Distribution : 2446 regions in total (including 0 suppressed)
  408. Metric value : Ratio : R-sum : Number of regions
  409. 0 : 0.771 : 0.771 : 1886 |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
  410. 1 : 0.110 : 0.881 : 268 |||||||||||
  411. 2 : 0.044 : 0.925 : 108 ||||
  412. 3 : 0.025 : 0.949 : 60 ||
  413. 4 : 0.016 : 0.966 : 40 ||
  414. 5 : 0.007 : 0.973 : 18 |
  415. 6 : 0.006 : 0.979 : 14 |
  416. 7 : 0.004 : 0.983 : 10
  417. 8 : 0.003 : 0.986 : 8
  418. 9 : 0.002 : 0.988 : 4
  419. 10 : 0.004 : 0.991 : 9
  420. 11 : 0.002 : 0.993 : 4
  421. 12 : 0.001 : 0.994 : 3
  422. 13 : 0.001 : 0.995 : 2
  423. 14 : 0.001 : 0.996 : 2
  424. 15-16 : 0.001 : 0.997 : 3
  425. 17-18 : 0.001 : 0.998 : 3
  426. 20 : 0.000 : 0.999 : 1
  427. 23-25 : 0.001 : 1.000 : 2
  428. 37 : 0.000 : 1.000 : 1
  429. :: info: Overall metrics for 'std.code.lines:code' metric
  430. Average : 6.64356984479
  431. Minimum : 0
  432. Maximum : 201
  433. Total : 23970.0
  434. Distribution : 3608 regions in total (including 0 suppressed)
  435. Metric value : Ratio : R-sum : Number of regions
  436. 0-1 : 0.088 : 0.088 : 319 |||||||||
  437. 2 : 0.320 : 0.409 : 1155 ||||||||||||||||||||||||||||||||
  438. 3 : 0.108 : 0.517 : 390 |||||||||||
  439. 4 : 0.081 : 0.598 : 294 ||||||||
  440. 5 : 0.080 : 0.678 : 290 ||||||||
  441. 6 : 0.061 : 0.739 : 220 ||||||
  442. 7 : 0.049 : 0.788 : 176 |||||
  443. 8 : 0.030 : 0.818 : 109 |||
  444. 9 : 0.025 : 0.843 : 89 ||
  445. 10-11 : 0.032 : 0.876 : 117 |||
  446. 12-13 : 0.020 : 0.895 : 71 ||
  447. 14 : 0.012 : 0.907 : 43 |
  448. 15-16 : 0.017 : 0.924 : 61 ||
  449. 17-19 : 0.015 : 0.939 : 55 ||
  450. 20-22 : 0.013 : 0.952 : 46 |
  451. 23-26 : 0.011 : 0.963 : 40 |
  452. 27-30 : 0.009 : 0.972 : 33 |
  453. 31-39 : 0.009 : 0.981 : 33 |
  454. 40-65 : 0.009 : 0.991 : 34 |
  455. 66-201 : 0.009 : 1.000 : 33 |
  456. :: info: Directory content:
  457. Directory : .
  458. </pre>
  459. <p>The same command with --db-file-prev option enables comparision and change trends are shown in [] brackets:</p>
  460. <pre>
  461. &gt; python "/path/to/metrix++.py" view --db-file=boost_1_54_0/metrixpp.db --db-file-prev=boost_1_52_0/metrixpp.db
  462. </pre>
  463. <pre>
  464. :: info: Overall metrics for 'std.code.complexity:cyclomatic' metric
  465. Average : 0.652902698283 [+0.00362138411453]
  466. Minimum : 0 [+0]
  467. Maximum : 37 [+1]
  468. Total : 1597.0 [+16.0]
  469. Distribution : 2446 [+11] regions in total (including 0 [+0] suppressed)
  470. Metric value : Ratio : R-sum : Number of regions
  471. 0 : 0.771 : 0.771 : 1886 [+5 ] |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
  472. 1 : 0.110 : 0.881 : 268 [+4 ] |||||||||||
  473. 2 : 0.044 : 0.925 : 108 [+0 ] ||||
  474. 3 : 0.025 : 0.949 : 60 [+2 ] ||
  475. 4 : 0.016 : 0.966 : 40 [-1 ] ||
  476. 5 : 0.007 : 0.973 : 18 [-1 ] |
  477. 6 : 0.006 : 0.979 : 14 [+1 ] |
  478. 7 : 0.004 : 0.983 : 10 [+1 ]
  479. 8 : 0.003 : 0.986 : 8 [+1 ]
  480. 9 : 0.002 : 0.988 : 4 [+0 ]
  481. 10 : 0.004 : 0.991 : 9 [-2 ]
  482. 11 : 0.002 : 0.993 : 4 [+1 ]
  483. 12 : 0.001 : 0.994 : 3 [+0 ]
  484. 13 : 0.001 : 0.995 : 2 [+0 ]
  485. 14 : 0.001 : 0.996 : 2 [+0 ]
  486. 15-16 : 0.001 : 0.997 : 3 [-1 ]
  487. 17-18 : 0.001 : 0.998 : 3 [+1 ]
  488. 20 : 0.000 : 0.999 : 1 [+0 ]
  489. 23-25 : 0.001 : 1.000 : 2 [+0 ]
  490. 36-37 : 0.000 : 1.000 : 1 [+0 ]
  491. :: info: Overall metrics for 'std.code.lines:code' metric
  492. Average : 6.64356984479 [+0.012181964309]
  493. Minimum : 0 [+0]
  494. Maximum : 201 [+4]
  495. Total : 23970.0 [+223.0]
  496. Distribution : 3608 [+27] regions in total (including 0 [+0] suppressed)
  497. Metric value : Ratio : R-sum : Number of regions
  498. 0-1 : 0.088 : 0.088 : 319 [+3 ] |||||||||
  499. 2 : 0.320 : 0.409 : 1155 [+9 ] ||||||||||||||||||||||||||||||||
  500. 3 : 0.108 : 0.517 : 390 [-3 ] |||||||||||
  501. 4 : 0.081 : 0.598 : 294 [+7 ] ||||||||
  502. 5 : 0.080 : 0.678 : 290 [+7 ] ||||||||
  503. 6 : 0.061 : 0.739 : 220 [-1 ] ||||||
  504. 7 : 0.049 : 0.788 : 176 [-2 ] |||||
  505. 8 : 0.030 : 0.818 : 109 [-1 ] |||
  506. 9 : 0.025 : 0.843 : 89 [+4 ] ||
  507. 10-11 : 0.032 : 0.876 : 117 [+9 ] |||
  508. 12-13 : 0.020 : 0.895 : 71 [-9 ] ||
  509. 14 : 0.012 : 0.907 : 43 [+0 ] |
  510. 15-16 : 0.017 : 0.924 : 61 [+0 ] ||
  511. 17-19 : 0.015 : 0.939 : 55 [+6 ] ||
  512. 20-22 : 0.013 : 0.952 : 46 [-3 ] |
  513. 23-26 : 0.011 : 0.963 : 40 [+2 ] |
  514. 27-30 : 0.009 : 0.972 : 33 [-3 ] |
  515. 31-39 : 0.009 : 0.981 : 33 [+0 ] |
  516. 40-65 : 0.009 : 0.991 : 34 [+1 ] |
  517. 66-201 : 0.009 : 1.000 : 33 [+1 ] |
  518. :: info: Directory content:
  519. Directory : .
  520. </pre>
  521. <h4>Reducing analysis scope</h4>
  522. <p>There are two ways to reduce the analysis scope for the view tool. The first is to enumerate paths of interest.
  523. For example, the following command reduces scope to 'allocators' sub-directory within the processed code.</p>
  524. <pre>
  525. &gt; python "/path/to/metrix++.py" view --db-file=boost_1_54_0/metrixpp.db -- ./boost/interprocess/allocators
  526. </pre>
  527. <p>The second is to specify --scope-mode option, which instructs the tool to process only modified and/or new files/regions.
  528. For example, view the summary metrics for all modified and new regions:</p>
  529. <pre>
  530. &gt; python "/path/to/metrix++.py" view --db-file=boost_1_54_0/metrixpp.db --db-file-prev=boost_1_52_0/metrixpp.db --scope-mode=touched
  531. </pre>
  532. <pre>
  533. :: info: Overall metrics for 'std.code.complexity:cyclomatic' metric
  534. Average : 1.84924623116 [-0.0230941943761]
  535. Minimum : 0 [+0]
  536. Maximum : 37 [+1]
  537. Total : 368.0 [+16.0]
  538. Distribution : 199 [+11] regions in total (including 0 [+0] suppressed)
  539. Metric value : Ratio : R-sum : Number of regions
  540. 0 : 0.608 : 0.608 : 121 [+5 ] |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
  541. 1 : 0.131 : 0.739 : 26 [+4 ] |||||||||||||
  542. 2 : 0.070 : 0.809 : 14 [+0 ] |||||||
  543. 3 : 0.060 : 0.869 : 12 [+2 ] ||||||
  544. 4 : 0.015 : 0.884 : 3 [-1 ] ||
  545. 5 : 0.015 : 0.899 : 3 [-1 ] ||
  546. 6 : 0.005 : 0.905 : 1 [+1 ] |
  547. 7 : 0.015 : 0.920 : 3 [+1 ] ||
  548. 8 : 0.015 : 0.935 : 3 [+1 ] ||
  549. 9 : 0.010 : 0.945 : 2 [+0 ] |
  550. 10 : 0.010 : 0.955 : 2 [-2 ] |
  551. 11 : 0.005 : 0.960 : 1 [+1 ] |
  552. 12 : 0.005 : 0.965 : 1 [+0 ] |
  553. 13 : 0.005 : 0.970 : 1 [+0 ] |
  554. 16 : 0.005 : 0.975 : 1 [-1 ] |
  555. 17 : 0.005 : 0.980 : 1 [+0 ] |
  556. 18 : 0.010 : 0.990 : 2 [+1 ] |
  557. 20 : 0.005 : 0.995 : 1 [+0 ] |
  558. 36-37 : 0.005 : 1.000 : 1 [+0 ] |
  559. :: info: Overall metrics for 'std.code.lines:code' metric
  560. Average : 15.9645390071 [-0.815853149771]
  561. Minimum : 0 [+0]
  562. Maximum : 201 [+6]
  563. Total : 4502.0 [+223.0]
  564. Distribution : 282 [+27] regions in total (including 0 [+0] suppressed)
  565. Metric value : Ratio : R-sum : Number of regions
  566. 0-1 : 0.053 : 0.053 : 15 [+3 ] |||||
  567. 2 : 0.124 : 0.177 : 35 [+9 ] ||||||||||||
  568. 3 : 0.053 : 0.230 : 15 [-3 ] |||||
  569. 4 : 0.060 : 0.291 : 17 [+7 ] ||||||
  570. 5 : 0.089 : 0.379 : 25 [+7 ] |||||||||
  571. 6 : 0.060 : 0.440 : 17 [-1 ] ||||||
  572. 7 : 0.050 : 0.489 : 14 [-2 ] |||||
  573. 8-9 : 0.074 : 0.564 : 21 [+3 ] |||||||
  574. 10 : 0.035 : 0.599 : 10 [+5 ] ||||
  575. 11 : 0.082 : 0.681 : 23 [+4 ] ||||||||
  576. 12-13 : 0.043 : 0.723 : 12 [-9 ] ||||
  577. 14-15 : 0.039 : 0.762 : 11 [-1 ] ||||
  578. 16-18 : 0.028 : 0.791 : 8 [+4 ] |||
  579. 19-22 : 0.039 : 0.830 : 11 [+0 ] ||||
  580. 23-26 : 0.039 : 0.869 : 11 [+2 ] ||||
  581. 27-32 : 0.028 : 0.897 : 8 [-3 ] |||
  582. 38-50 : 0.025 : 0.922 : 7 [+0 ] ||
  583. 51-69 : 0.025 : 0.947 : 7 [+1 ] ||
  584. 71-100 : 0.032 : 0.979 : 9 [+2 ] |||
  585. 101-201 : 0.021 : 1.000 : 6 [-1 ] ||
  586. :: info: Directory content:
  587. Directory : .
  588. </pre>
  589. </section>
  590. <section id="workflow_view_details_section">
  591. <h3>Detailed metrics per file/region</h3>
  592. <p>The same view tool can print detailed metrics per file and per every region in the specified file.
  593. In order to get detailed metrics, enumerate files of interest after '--'. For example:</p>
  594. <pre>
  595. &gt; python "/path/to/metrix++.py" view --db-file=boost_1_54_0/metrixpp.db --db-file-prev=boost_1_52_0/metrixpp.db -- ./boost/interprocess/detail/managed_open_or_create_impl.hpp
  596. </pre>
  597. <p>produces output similar to this (truncated to make the page shorter):</p>
  598. <pre>
  599. ./interprocess/detail/managed_open_or_create_impl.hpp:302: info: Metrics per 'priv_open_or_create' region
  600. Region name : priv_open_or_create
  601. Region type : function
  602. Offsets : 8314-14526
  603. Line numbers : 301-467
  604. Modified : True
  605. std.code.complexity:cyclomatic: 37 [+1]
  606. std.code.lines:code: 148 [+4]
  607. </pre>
  608. </section>
  609. <section>
  610. <h3>More about the viewer</h3>
  611. <p>The 'view' command has got an option to alter the output format. It is possible to get the same data
  612. in xml pr python disctionary formats. This can be particularly useful for integration of the tool with
  613. other applications. For example, an editor may re-collect and show context based metrics when a file is saved.</p>
  614. <pre>
  615. &gt; python "/path/to/metrix++.py" view --db-file=boost_1_54_0/metrixpp.db --format=xml
  616. </pre>
  617. <p>Check other options of the view tool by executing:</p>
  618. <pre>
  619. &gt; python "/path/to/metrix++.py" view --help
  620. </pre>
  621. </section>
  622. <section id="workflow_limit_section">
  623. <h2>Apply thresholds</h2>
  624. <p>The viewer shows (above) that there are function with quite large value of cyclomatic complexity metric.
  625. Growth of this metric can be considered as negative trend. Metrix++ 'limit' tool offers the capability
  626. to organise the control over trends by applying limits to metric values.
  627. Exceeded limites are alarms in the quality management and control.</p>
  628. </section>
  629. <section id="workflow_limit_hotspots_section">
  630. <h3>Hotspots</h3>
  631. <p>Hotspots mode of the limit tool helps to identify top files/regions exceeding a metric threshold.
  632. Let's identify top 3 functions in boost interprocess library, which exceed limit of 15 points of
  633. cyclomatic complexity metric:</p>
  634. <pre>
  635. &gt; python "/path/to/metrix++.py" limit --db-file=boost_1_54_0/metrixpp.db --max-limit=std.code.complexity:cyclomatic:15 --hotspots=3
  636. </pre>
  637. <pre>
  638. ./interprocess/detail/managed_open_or_create_impl.hpp:302: warning: Metric 'std.code.complexity:cyclomatic' for region 'priv_open_or_create' exceeds the limit.
  639. Metric name : std.code.complexity:cyclomatic
  640. Region name : priv_open_or_create
  641. Metric value : 37
  642. Modified : None
  643. Change trend : None
  644. Limit : 15.0
  645. Suppressed : False
  646. ./interprocess/streams/vectorstream.hpp:284: warning: Metric 'std.code.complexity:cyclomatic' for region 'seekoff' exceeds the limit.
  647. Metric name : std.code.complexity:cyclomatic
  648. Region name : seekoff
  649. Metric value : 25
  650. Modified : None
  651. Change trend : None
  652. Limit : 15.0
  653. Suppressed : False
  654. ./interprocess/streams/bufferstream.hpp:174: warning: Metric 'std.code.complexity:cyclomatic' for region 'seekoff' exceeds the limit.
  655. Metric name : std.code.complexity:cyclomatic
  656. Region name : seekoff
  657. Metric value : 23
  658. Modified : None
  659. Change trend : None
  660. Limit : 15.0
  661. Suppressed : False
  662. </pre>
  663. </section>
  664. <section id="workflow_limit_control_section">
  665. <h3>Controlling trends</h3>
  666. <p>Exit code of the 'limit' tool is equal to number of warnings printed. This allows to use the tool
  667. as a static analysis tool during software build process. In this case, non-zero exit code means
  668. that there are violations to the agreed standards and it may fail the build. So, the same command
  669. without --hotspots option will print all regions/files exceeding the specified limit:</p>
  670. <pre>
  671. &gt; python "/path/to/metrix++.py" limit --db-file=boost_1_54_0/metrixpp.db --max-limit=std.code.complexity:cyclomatic:15
  672. </pre>
  673. <h4>Modes to exclude old code from the considiration</h4>
  674. <p>However, it is likely there are many warnings printed in this mode, especially if very old or legacy code is profiled
  675. against new metrics and coding rules. Although all warnings can be removed
  676. by re-factoring in scope of big task force activity, it is where many tools are rejected,
  677. because it is difficult to justify the initial cost of applying and integrating them.
  678. Metrix++ 'limit' tool has got an option --warn-mode, which helps to overcome this problem.</p>
  679. <p>--warn-mode=touched encourages re-factoring only for new and modified regions. It enables
  680. continuous refactoring. It does not matter how late the rule is applied or
  681. coding standard is modified. It is possible to do it anytime with zero initial investment.
  682. For example, applying it to boost interprocess library for a changes between 1.52 and 1.54 versions
  683. results in only 6 warnings:</p>
  684. <pre>
  685. &gt; python "/path/to/metrix++.py" limit --db-file=boost_1_54_0/metrixpp.db --db-file-prev=boost_1_52_0/metrixpp.db --max-limit=std.code.complexity:cyclomatic:15 --warn-mode=touched
  686. </pre>
  687. <pre>
  688. ./interprocess/detail/managed_open_or_create_impl.hpp:302: warning: Metric 'std.code.complexity:cyclomatic' for region 'priv_open_or_create' exceeds the limit.
  689. Metric name : std.code.complexity:cyclomatic
  690. Region name : priv_open_or_create
  691. Metric value : 37
  692. Modified : True
  693. Change trend : +1
  694. Limit : 15.0
  695. Suppressed : False
  696. ./interprocess/ipc/message_queue.hpp:375: warning: Metric 'std.code.complexity:cyclomatic' for region 'insert_at' exceeds the limit.
  697. Metric name : std.code.complexity:cyclomatic
  698. Region name : insert_at
  699. Metric value : 16
  700. Modified : True
  701. Change trend : 0
  702. Limit : 15.0
  703. Suppressed : False
  704. ./interprocess/mapped_region.hpp:575: warning: Metric 'std.code.complexity:cyclomatic' for region 'mapped_region' exceeds the limit.
  705. Metric name : std.code.complexity:cyclomatic
  706. Region name : mapped_region
  707. Metric value : 18
  708. Modified : True
  709. Change trend : +2
  710. Limit : 15.0
  711. Suppressed : False
  712. ./interprocess/mem_algo/detail/mem_algo_common.hpp:452: warning: Metric 'std.code.complexity:cyclomatic' for region 'priv_allocate_many' exceeds the limit.
  713. Metric name : std.code.complexity:cyclomatic
  714. Region name : priv_allocate_many
  715. Metric value : 20
  716. Modified : True
  717. Change trend : 0
  718. Limit : 15.0
  719. Suppressed : False
  720. ./interprocess/mem_algo/rbtree_best_fit.hpp:787: warning: Metric 'std.code.complexity:cyclomatic' for region 'priv_expand_both_sides' exceeds the limit.
  721. Metric name : std.code.complexity:cyclomatic
  722. Region name : priv_expand_both_sides
  723. Metric value : 17
  724. Modified : True
  725. Change trend : 0
  726. Limit : 15.0
  727. Suppressed : False
  728. ./interprocess/sync/windows/named_sync.hpp:98: warning: Metric 'std.code.complexity:cyclomatic' for region 'open_or_create' exceeds the limit.
  729. Metric name : std.code.complexity:cyclomatic
  730. Region name : open_or_create
  731. Metric value : 18
  732. Modified : True
  733. Change trend : 0
  734. Limit : 15.0
  735. Suppressed : False
  736. </pre>
  737. <p>If it is challenging or not beneficial to refactor everything touched,
  738. --warn-mode=trends simplifies the control over modified regions and only makes sure
  739. that there are no regressions in modified code. In other words, a warning is printed about modified region/file
  740. only if a metric exceeds the specified limit and the value of the metric has got negative trend in modification.
  741. It is possible to apply it anytime with zero initial investment and almost zero on-going investment around old code.
  742. For example, applying it to boost interprocess library for a changes between 1.52 and 1.54 versions
  743. results in only 2 warnings:</p>
  744. <pre>
  745. &gt; python "/path/to/metrix++.py" limit --db-file=boost_1_54_0/metrixpp.db --db-file-prev=boost_1_52_0/metrixpp.db --max-limit=std.code.complexity:cyclomatic:15 --warn-mode=trend
  746. </pre>
  747. <pre>
  748. ./interprocess/detail/managed_open_or_create_impl.hpp:302: warning: Metric 'std.code.complexity:cyclomatic' for region 'priv_open_or_create' exceeds the limit.
  749. Metric name : std.code.complexity:cyclomatic
  750. Region name : priv_open_or_create
  751. Metric value : 37
  752. Modified : True
  753. Change trend : +1
  754. Limit : 15.0
  755. Suppressed : False
  756. ./interprocess/mapped_region.hpp:575: warning: Metric 'std.code.complexity:cyclomatic' for region 'mapped_region' exceeds the limit.
  757. Metric name : std.code.complexity:cyclomatic
  758. Region name : mapped_region
  759. Metric value : 18
  760. Modified : True
  761. Change trend : +2
  762. Limit : 15.0
  763. Suppressed : False
  764. </pre>
  765. <p>--warn-mode=new drops control over existing code and ensures that warnings are only about new code.
  766. For example, applying it to boost interprocess library for a changes between 1.52 and 1.54 versions
  767. results in 0 warnings, so new code is totally compliant with the standard required in the example.</p>
  768. <pre>
  769. &gt; python "/path/to/metrix++.py" limit --db-file=boost_1_54_0/metrixpp.db --db-file-prev=boost_1_52_0/metrixpp.db --max-limit=std.code.complexity:cyclomatic:15 --warn-mode=new
  770. </pre>
  771. <h4>Suppressions</h4>
  772. <p>It is possible to suppress warnings on exceptional basis. Suppressions are collected from comments in code
  773. and used by the 'limit' tool to filter out unnecessary (suppressed) warnings.
  774. It allows to take fine grained control over false-positive warnings, if there are.</p>
  775. <p>In order to suppress a warning:</p>
  776. <ul>
  777. <li>per region metrics: put the metrix++ instruction in the comments before the region, for example:</li>
  778. <pre class="prettyprint linenums">
  779. // This function returns string typed
  780. // representation of a name of a color,
  781. // requested by color's id
  782. // metrix++: suppress std.code.complexity:cyclomatic
  783. std::string getColorName(int color_id)
  784. {
  785. switch (color_id)
  786. {
  787. case COLOR_RED:
  788. return std::string("red")
  789. case COLOR_GREEN:
  790. return std::string("green")
  791. case COLOR_BLUE:
  792. return std::string("blue")
  793. /* and so on */
  794. }
  795. }
  796. </pre>
  797. <li>per file metrics: put the metrix++ instruction in the comments at the beginning of a file, for example:</li>
  798. <pre class="prettyprint linenums">
  799. //
  800. // This file does processing of colors and brushes
  801. // Copyright is my company, 2013
  802. //
  803. // However, it is too long and big file, and there is no time
  804. // to split it into multiple file, so shut up the metrix++ warnings:
  805. // metrix++: suppress std.general:size
  806. //
  807. std::string getColorName(int color_id)
  808. {
  809. ...
  810. ...
  811. </pre>
  812. <li>activate collection of suppressions:</li>
  813. <pre>
  814. &gt; python "/path/to/metrix++.py" collect --std.suppress
  815. </pre>
  816. <li>run the 'limit' tool WITHOUT --disable-suppressions option:</li>
  817. <pre>
  818. &gt; python "/path/to/metrix++.py" limit ...
  819. </pre>
  820. </ul>
  821. <h5>Important notice:</h5>
  822. <ul><li>--std.suppress option enables collection of 2 metrics as well: 'std.suppress:count' and
  823. 'std.suppress.file:count'. The first is number of suppressions per region.
  824. The second is the same but applies to file-scope metrics.
  825. It allows to manage the amount of suppressions.
  826. Usually there are no false-positives to suppress with the <strong>right</strong> metric,
  827. but could be exceptions in specific cases. Managing suppressions is about managing exceptions.
  828. If there are many exceptional cases, maybe something is wrong with a metric or an application of a metric.
  829. Two code examples about colors above do not demonstrate the technically exceptional case,
  830. they likely demonstrate a case of a process exception, like "there is no time to do it proper now", or
  831. a case of wrong application of a metric, like "shut up the useless tool". So, be careful.
  832. The 'view' tool shows number of suppressions and its change trends on per metric basis.</li></ul>
  833. </section>
  834. <section id="workflow_other_section">
  835. <h2>Other applications</h2>
  836. <h3>Checking data file properties</h3>
  837. <p>Metrix++ 'info' tool is helpful to check properties of a data file, like settings used to write it,
  838. colected metrics and files processed. For example:</p>
  839. <pre>
  840. &gt; python "/path/to/metrix++.py" info --db-file=boost_1_54_0/metrixpp.db
  841. </pre>
  842. <pre>
  843. boost_1_54_0/metrixpp.db:: info: Created using plugins and settings:
  844. version : 1.0
  845. std.code.complexity:version: 1.1
  846. std.code.cpp:version: 1.1
  847. std.code.cpp:files: *.c,*.cc,*.cpp,*.cxx,*.h,*.hh,*.hpp,*.hxx
  848. std.code.cs:version: 1.0
  849. std.code.cs:files: *.cs
  850. std.code.java:version: 1.1
  851. std.code.java:files: *.java
  852. std.code.lines:version: 1.1
  853. test_workflow.db:: info: Collected metrics:
  854. std.code.complexity:cyclomatic:
  855. std.code.lines:code:
  856. :: info: Processed files and checksums:
  857. ./interprocess/allocators/detail/node_pool.hpp: 0xb099a7c3
  858. ./interprocess/allocators/detail/node_tools.hpp: 0xaaf5044d
  859. ./interprocess/anonymous_shared_memory.hpp: 0x2bf06cb0
  860. ./interprocess/containers/allocation_type.hpp: 0x8e95cda0
  861. ./interprocess/containers/containers_fwd.hpp: 0xa4d0d9f7
  862. ./interprocess/containers/deque.hpp: 0x6dbb77af
  863. ./interprocess/containers/flat_map.hpp: 0x6750338c
  864. ...
  865. </pre>
  866. <h3>Exporting results</h3>
  867. <p>Metrix++ 'export' tool exports data files to csv formated files. For example:</p>
  868. <pre>
  869. &gt; python "/path/to/metrix++.py" export --db-file=boost_1_54_0/metrixpp.db > boost_1_54_0/metrixpp.csv
  870. </pre>
  871. <pre>
  872. file,region,type,modified,line start,line end,std.code.complexity:cyclomatic,std.code.lines:code
  873. ./interprocess/allocators/detail/node_pool.hpp,__global__,global,,1,110,,0
  874. ./interprocess/allocators/detail/node_pool.hpp,boost,namespace,,33,105,,2
  875. ./interprocess/allocators/detail/node_pool.hpp,interprocess,namespace,,34,104,,2
  876. ./interprocess/allocators/detail/node_pool.hpp,ipcdetail,namespace,,35,103,,4
  877. ./interprocess/allocators/detail/node_pool.hpp,SegmentManager,class,,39,72,,16
  878. ...
  879. </pre>
  880. <p>Files with csv format can be opened by applications, like Microsoft Office Excel, with advanced analysis capabilities.
  881. For example, to draw this distribution graph:</p>
  882. <p align="center"><img src="assets/img/piechart.png"/></p>
  883. <p>It is not recommended to use export tool to implement custom post-analysis Metrix++ extensions.
  884. The main reason is non granted backward compatibility support for csv columns. Another main reason is that
  885. exporting is relatively slow process. It is recommended to use Metrix++ extensions API instead.</p>
  886. </section>
  887. <section id="extend_section">
  888. <div class="page-header">
  889. <h1>Create plugin</h1>
  890. </div>
  891. <h2>New metric</h2>
  892. <p>describe METRIXPLUSPLUS_PATH environment variable</p>
  893. <h2>New language</h2>
  894. <p>...</p>
  895. <h2>New analysis tool</h2>
  896. <p>...</p>
  897. </section>
  898. <section id="contribute_section">
  899. <div class="page-header">
  900. <h1>Feeback and contribute</h1>
  901. </div>
  902. <h2>Feedback</h2>
  903. <p>...</p>
  904. </section>
  905. </div> <!-- end for sections -->
  906. </div></div> <!-- end for row and container -->
  907. <!-- Footer
  908. ================================================== -->
  909. <footer class="footer">
  910. <div class="container">
  911. <div class="row">
  912. <div class="span3">
  913. <p><a href="http://sourceforge.net/projects/metrixplusplus/"><img src="http://sflogo.sourceforge.net/sflogo.php?group_id=275605&amp;type=3"
  914. alt="Get Metrix++ at SourceForge.net. Fast, secure and Free Open Source software downloads" border="0"></a></p>
  915. <p>&middot;</p>
  916. <p>&middot; &middot;<script type="text/javascript" src="http://www.ohloh.net/p/485947/widgets/project_users_logo.js"></script></p>
  917. <p><a href="http://freecode.com/projects/metrix"><img src="assets/img/fm_logo.png" width="130"></a></p>
  918. <p>&middot;</p>
  919. </div>
  920. <div class="span9">
  921. <p>Copyright <strong>&copy;</strong> 2009 - 2013, <a href="mailto:avkonst@users.sourceforge.net"><span class="normalImportance">Metrix++</span> Project</a></p>
  922. <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>
  923. <ul class="footer-links">
  924. <li><a href="https://sourceforge.net/p/metrixplusplus/tickets/new/">Ask question</a></li>
  925. <li class="muted">&middot;</li>
  926. <li><a href="https://sourceforge.net/p/metrixplusplus/tickets/new/">Report defect</a></li>
  927. <li class="muted">&middot;</li>
  928. <li><a href="https://sourceforge.net/p/metrixplusplus/tickets/new/">Feature request</a></li>
  929. <li class="muted">&middot;</li>
  930. <li><a href="https://sourceforge.net/p/metrixplusplus/tickets/search/?q=%21status%3Awont-fix+%26%26+%21status%3Aclosed">Open issues</a></li>
  931. <li class="muted">&middot;</li>
  932. <li><a href="https://sourceforge.net/p/metrixplusplus/wiki/ChangeLog/">Changelog</a></li>
  933. </ul>
  934. </div>
  935. </div>
  936. </div>
  937. </footer>
  938. <!-- Le javascript
  939. ================================================== -->
  940. <!-- Placed at the end of the document so the pages load faster -->
  941. <script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
  942. <script src="assets/js/jquery.js"></script>
  943. <script src="assets/js/bootstrap-transition.js"></script>
  944. <script src="assets/js/bootstrap-alert.js"></script>
  945. <script src="assets/js/bootstrap-modal.js"></script>
  946. <script src="assets/js/bootstrap-dropdown.js"></script>
  947. <script src="assets/js/bootstrap-scrollspy.js"></script>
  948. <script src="assets/js/bootstrap-tab.js"></script>
  949. <script src="assets/js/bootstrap-tooltip.js"></script>
  950. <script src="assets/js/bootstrap-popover.js"></script>
  951. <script src="assets/js/bootstrap-button.js"></script>
  952. <script src="assets/js/bootstrap-collapse.js"></script>
  953. <script src="assets/js/bootstrap-carousel.js"></script>
  954. <script src="assets/js/bootstrap-typeahead.js"></script>
  955. <script src="assets/js/bootstrap-affix.js"></script>
  956. <script>
  957. !function ($) {
  958. $(function(){
  959. // carousel demo
  960. $('#myCarousel').carousel()
  961. })
  962. }(window.jQuery)
  963. </script>
  964. <script src="assets/js/holder/holder.js"></script>
  965. <script src="assets/js/google-code-prettify/prettify.js"></script>
  966. <script src="assets/js/application.js"></script>
  967. <script>
  968. </script>
  969. <!-- Analytics
  970. ================================================== -->
  971. <!--
  972. <script>
  973. var _gauges = _gauges || [];
  974. (function() {
  975. var t = document.createElement('script');
  976. t.type = 'text/javascript';
  977. t.async = true;
  978. t.id = 'gauges-tracker';
  979. t.setAttribute('data-site-id', '4f0dc9fef5a1f55508000013');
  980. t.src = '//secure.gaug.es/track.js';
  981. var s = document.getElementsByTagName('script')[0];
  982. s.parentNode.insertBefore(t, s);
  983. })();
  984. </script>
  985. -->
  986. </body>
  987. </html>