tag:blogger.com,1999:blog-8404509726009905633.post7732344915629118068..comments2023-10-09T14:15:54.979+03:00Comments on Mind Reference: Python code metrics with pymetricsAndriy Kornatskyyhttp://www.blogger.com/profile/04890869628175359888noreply@blogger.comBlogger12125tag:blogger.com,1999:blog-8404509726009905633.post-22831353750515075542012-05-30T09:49:55.877+03:002012-05-30T09:49:55.877+03:00There is no summary metrics report, you need calcu...There is no summary metrics report, you need calculate appropriate metrics out from csv file.Andriy Kornatskyyhttps://www.blogger.com/profile/04890869628175359888noreply@blogger.comtag:blogger.com,1999:blog-8404509726009905633.post-59464847915924280782012-05-30T08:38:30.850+03:002012-05-30T08:38:30.850+03:00Hi, csv output of PyMetrics gives line by line det...Hi, csv output of PyMetrics gives line by line details of the code. Is there anyway to get summery metrics output in csv format?Gruff Jimmynoreply@blogger.comtag:blogger.com,1999:blog-8404509726009905633.post-46760429490627557982012-05-29T11:16:48.659+03:002012-05-29T11:16:48.659+03:00I think that is the solution Andriy. Your blog is ...I think that is the solution Andriy. Your blog is great and appricate your quick respoces. Thank you very much.Ericknoreply@blogger.comtag:blogger.com,1999:blog-8404509726009905633.post-39885546557833578322012-05-29T09:59:28.896+03:002012-05-29T09:59:28.896+03:00Eric, unfortunately there is no way to output resu...Eric, unfortunately there is no way to output result into xml file, however there is CSV output format that you might consider translate to XML as appropriate.Andriy Kornatskyyhttps://www.blogger.com/profile/04890869628175359888noreply@blogger.comtag:blogger.com,1999:blog-8404509726009905633.post-16923397881655139322012-05-29T06:28:00.947+03:002012-05-29T06:28:00.947+03:00Thank you very much Andriy for your quick reply. Y...Thank you very much Andriy for your quick reply. Yeah, your first option is working. But, it seems like i should try for an xml output. Can i do that?<br />I could not get any solution from your second option.Ericknoreply@blogger.comtag:blogger.com,1999:blog-8404509726009905633.post-44102463871042633122012-05-28T21:32:33.630+03:002012-05-28T21:32:33.630+03:001. How about redirecting shell output to file?
p...1. How about redirecting shell output to file?<br /> pymetrics hello.py > results.txt<br />2. There are a number of options available, just<br />try issue the following command:<br /> pymetrics --helpAndriy Kornatskyyhttps://www.blogger.com/profile/04890869628175359888noreply@blogger.comtag:blogger.com,1999:blog-8404509726009905633.post-11102557649931083232012-05-28T13:03:51.204+03:002012-05-28T13:03:51.204+03:00Hi Andriy,
Is there a way to get the output of PyM...Hi Andriy,<br />Is there a way to get the output of PyMetrics to a format like .txt, .xml or anyother format instead of the terminal?Ericknoreply@blogger.comtag:blogger.com,1999:blog-8404509726009905633.post-78949472682147500152012-05-17T01:26:10.331+03:002012-05-17T01:26:10.331+03:001-15 for a single method is probably rather high. ...1-15 for a single method is probably rather high. In the 2nd edition of Code Complete by Steve McConnell it mentions 0-5 as being "probably fine", and 6-10 to be a point at which you should start thinking about simplifying. At 10+ he recommends breaking parts of the routines into subroutines.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8404509726009905633.post-91184429412746023472011-12-08T10:04:37.576+02:002011-12-08T10:04:37.576+02:00COCOMO (Constructive Cost Model) is estimated soft...COCOMO (Constructive Cost Model) is estimated software cost. You should take is as something relative.<br /><br />You are working on project A that has a score S1 and a support for a project B is coming to you/team next week, it would be nice to have a quick idea how project B source code is complex, what is estimated cost so you can properly plan resource available. This is where metrics help. Andriy Kornatskyyhttps://www.blogger.com/profile/04890869628175359888noreply@blogger.comtag:blogger.com,1999:blog-8404509726009905633.post-87169565143105317242011-12-08T08:53:12.054+02:002011-12-08T08:53:12.054+02:00...
I missread the correct result.
McCabe Complex......<br />I missread the correct result.<br /><br />McCabe Complexity Metric for file src/greatings/helloworld.py<br />--------------------------------------------------------------<br /> 2 __main__<br /> 1 main<br /> 1 say<br /><br />COCOMO 2's SLOC Metric for src/greatings/helloworld.py<br />-------------------------------------------------------<br />Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8404509726009905633.post-3137574241819476152011-11-29T18:15:45.271+02:002011-11-29T18:15:45.271+02:00This is extremely high... I would suggest:
1. try ...This is extremely high... I would suggest:<br />1. try to identify actors in your code; visualize the code in some sort of drawing so you can have an overall picture (no need for special software, just paper and pencil); develop ten items plan of what can be refactored first.<br />2. split functions that are longer than your screen can fit in several smaller functions, introduce modules<br />3. Andriy Kornatskyyhttps://www.blogger.com/profile/04890869628175359888noreply@blogger.comtag:blogger.com,1999:blog-8404509726009905633.post-71093406094390675702011-11-29T17:36:46.828+02:002011-11-29T17:36:46.828+02:00Score 1135 in complexity.
Do I have to do somethin...Score 1135 in complexity.<br />Do I have to do something when score is upper 1000 ?Anonymousnoreply@blogger.com