Book a Demo

Author Topic: Macabes cyclomatic complexity  (Read 6255 times)

student_blagger

  • EA Novice
  • *
  • Posts: 8
  • Karma: +0/-0
  • heres my fist..kindly run into it
    • View Profile
Macabes cyclomatic complexity
« on: April 03, 2006, 09:01:32 am »
Is there any way to calutae McCabe's cyclomatic complexity of php code with EA? Ive searched google and i cant find any tool that does. :( found lots for java, c++ ect but not php. Can anyone point me in the right direction?
Im too lazy to do by hand ;)

Thanks,

Lee

mikewhit

  • EA User
  • **
  • Posts: 608
  • Karma: +0/-0
  • Accessing ....
    • View Profile
Re: Macabes cyclomatic complexity
« Reply #1 on: April 03, 2006, 10:00:18 am »
What, too lazy to count it, or too lazy to convert the existing counting routines ?

PS. found a Spring 2006 university assignment with the phrase "... Given the difficulty in finding PHP-specific tools for gathering metrics, ..."

If this is your coursework, you should be doing it yourself !!
« Last Edit: April 03, 2006, 10:12:04 am by mikewhit »

student_blagger

  • EA Novice
  • *
  • Posts: 8
  • Karma: +0/-0
  • heres my fist..kindly run into it
    • View Profile
Re: Macabes cyclomatic complexity
« Reply #2 on: April 03, 2006, 10:11:18 am »
to lazy to generate the graphs by hand.. do you mean there are routines to do this already?!?
« Last Edit: April 03, 2006, 10:12:21 am by student_blagger »

student_blagger

  • EA Novice
  • *
  • Posts: 8
  • Karma: +0/-0
  • heres my fist..kindly run into it
    • View Profile
Re: Macabes cyclomatic complexity
« Reply #3 on: April 03, 2006, 10:12:56 am »
lol no... its not me..i found that site to

mikewhit

  • EA User
  • **
  • Posts: 608
  • Karma: +0/-0
  • Accessing ....
    • View Profile
Re: Macabes cyclomatic complexity
« Reply #4 on: April 03, 2006, 10:36:34 am »
that site to what ?
« Last Edit: April 06, 2006, 12:51:21 am by mikewhit »

student_blagger

  • EA Novice
  • *
  • Posts: 8
  • Karma: +0/-0
  • heres my fist..kindly run into it
    • View Profile
Re: Macabes cyclomatic complexity
« Reply #5 on: April 03, 2006, 10:45:01 am »
to work out the cyclomatic complexity u need to do this:

Cyclomatic complexity (CC) = E - N + p

where E = the number of edges of the graph

N = the number of nodes of the graph

p = the number of connected components

ive got 20,000 lines of code i didnt fancy going through my code by hand to draw a diagram with the connections between every bit of code!..hence im looking for a tool that will do it for me

sargasso

  • EA Practitioner
  • ***
  • Posts: 1406
  • Karma: +1/-2
  • 10 COMFROM 30; 20 HALT; 30 ONSUB(50,90,10)
    • View Profile
Re: Macabes cyclomatic complexity
« Reply #6 on: April 03, 2006, 03:24:38 pm »
OK I'm too lazy to look it up. ;D What's it good for?  Has any anywhere done anything like Kirsten Ribu's work on use case points with it?  (BTW has anyone anywhere seen an update on Ribu's work?)
bruce
"It is not so expressed, but what of that?
'Twere good you do so much for charity."

Oh I forgot, we aren't doing him are we.

thomaskilian

  • Guest
Re: Macabes cyclomatic complexity
« Reply #7 on: April 03, 2006, 11:24:42 pm »
Quote
Is there any way to calutae McCabe's cyclomatic complexity of php code with EA? ...

:o I wasn't aware that EA can be used as calculator

mikewhit

  • EA User
  • **
  • Posts: 608
  • Karma: +0/-0
  • Accessing ....
    • View Profile
Re: Macabes cyclomatic complexity
« Reply #8 on: April 04, 2006, 02:05:45 am »
Why not - Google can ;-)

But I would have thought this would better be a candidate for an Eclipse plugin.
EA's code knowledge is only insofar as it's relevant to modelling and extracting class information - not code metrics.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Macabes cyclomatic complexity
« Reply #9 on: April 04, 2006, 07:15:39 pm »
Currently EA does not have any capability of calculating metrics of any sort on code.  Our parsing could be extended in the future to make this sort of calculation possible.
« Last Edit: April 04, 2006, 07:17:12 pm by simonm »

student_blagger

  • EA Novice
  • *
  • Posts: 8
  • Karma: +0/-0
  • heres my fist..kindly run into it
    • View Profile
Re: Macabes cyclomatic complexity
« Reply #10 on: April 05, 2006, 10:08:36 am »
ok thanks for the info guys..looks like ill have to get my pen out  :o

mikewhit

  • EA User
  • **
  • Posts: 608
  • Karma: +0/-0
  • Accessing ....
    • View Profile
Re: Macabes cyclomatic complexity - Eclipse/Java
« Reply #11 on: October 19, 2006, 03:41:23 am »
Metrics for Java - now all we need are mods for other languages !

http://metrics.sourceforge.net/