Hi,

actually, it also depends on how you generate the MSE file.

The ones your are looking at were created with infusion I believe.

VerveineJ extracts only two metrics:
- number of instruction
- Cyclomatic complexity.

The reason is that these two cannot be computed from the data we have in the meta-model.
Anything that can be computed from the metamodel (e.g. dependencies between packages/classes/methods) should be done in Moose.

I believe Infusion as a different approach and computes much more things because it can used standalone.

As for the metrics in moose, you can use the pragmas or not.
Using the pragmas will allow your metric to appear automagically in the moose browser (in the metric tab).
If you don't put the pragma, you can still use it, but only in your programs

nicolas



De: "Jùlio" <jleandro.martins@gmail.com>
À: "Moose-related development" <moose-dev@iam.unibe.ch>
Envoyé: Lundi 12 Septembre 2011 00:24:37
Objet: [Moose-dev] Re: MSE file and Metrics

>Metrics are not computed during the parsing of MSE files.
>There are two kinds of metrics:
>       - some that are computed at FAMIX extraction time (for example cyclomatic complexity, LOC)
>      - the other metrics are computer when there are needed (number of variables, number of methods)

Indeed metrics are assessed during extration time. The mse file is like a record of a previous code analysis.

>Sure
>Normally adding a metrics in Moose is a question of minutes.
>Have a look at numberOfMethods for an example

Ok! I gave a look in your exemple and it came a doubt: to use my metric I need to create a new tag on mse file (and consequently create a new method on moose to show it) , I'm correct? If yes, how I can to do this?  I don't find the information that i need so end resorting to the forum.

For exemple look on this piece of mse file Where the metrics such as WLOC, WNOS, etc are defined?

(FAMIX.Class (id: 295)
    (sourceAnchor (ref: 199415))
    (isStub true)
    (container (ref: 42))
    (name 'Level')
    (WLOC 0.00)
    (WNOS 0.00)
    (WNOCond 0.00)
    (WNOCmts 0.00)
    (WOC 0.00)
    (ATFD 0.00)
    (WMC 0.00)
    (TCC 0.00)
    (CRIX 0.00)
    (NOAM 0.00)
    (NOPA 0.00)
    (BUR 1.00)
    (BOvR 0.00)
    (AMW 0.00)
    (NOM 0.00)
    (NAS 0.00)
    (PNAS -1.00)
    (LOC 1.00)
    (NProtM 0.00)
)


Em 11 de setembro de 2011 17:38, Stéphane Ducasse <stephane.ducasse@inria.fr> escreveu:

On Sep 11, 2011, at 9:21 PM, Júlio Martins wrote:

> Hi people!
>
> I was learning about mse file and I noticed that it record a set of metrics. I would like to know what metrics are aseessed during the pasring to mse file?
> I need to generate some especific metric, but first I want to know what metrics are avaible to me take a better decision to implement this. have in some place a list of metrics avaible?


Hi julio

Metrics are not computed during the parsing of MSE files.
There are two kinds of metrics:
       - some that are computed at FAMIX extraction time (for example cyclomatic complexity, LOC)
       - the other metrics are computer when there are needed (number of variables, number of methods)

> An another question, if were the case, I needed to create my especific metric. Would be possible implement this?

Sure
Normally adding a metrics in Moose is a question of minutes.
Have a look at numberOfMethods for an example

Stef

>
> See ya!
> Julio Martins
>
> View this message in context: MSE file and Metrics
> Sent from the Moose mailing list archive at Nabble.com.
> _______________________________________________
> Moose-dev mailing list
> Moose-dev@iam.unibe.ch
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
Moose-dev@iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
Moose-dev@iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev