[Pharo-dev] [Moose-dev] Some FAMIX questions
tudor at tudorgirba.com
Thu Aug 29 16:11:16 EDT 2013
On Thu, Aug 29, 2013 at 9:58 PM, Stéphane Ducasse <stephane.ducasse at inria.fr
> nice analysis.
> I really hope that using smarter class structure based on Slot we can
> offer a solution in the future.
> On Aug 29, 2013, at 6:24 PM, Stephan Eggermont <stephan at stack.nl> wrote:
> > Currently, quite a lot of space seem to be taken up by not-filled
> > In my Delphi based Whitestar model, 406085 out of 664371
> > are either nil or empty sets. In a JHotDraw model from inFusion
> > it is 724408 out of 1351527
> > Stephan
> > FAMeasurements>measure
> > varSize := mClass instSize.
> > instSize := mClass allInstances size.
> > nrNil := 0.
> > nrEmpty := 0.
> > mClass allInstancesDo: [ :instance |
> > 1 to: varSize do: [:varIndex | |value|
> > value := instance instVarAt: varIndex.
> > value ifNil: [ nrNil := nrNil+1 ].
> > value isCollection ifTrue: [
> > value ifEmpty: [ nrEmpty := nrEmpty+1 ] ]
> ] ]
> > MeasureFAMIX>initializeMeasurements
> > FAMIXEntity withAllSubclassesDo: [ :each |
> > self measurements add: (FAMeasurements new
> > mClass: each;
> > yourself). ]
> > MeasureFAMIX>run
> > self initializeMeasurements.
> > measurements do: [ :each | each measure]
> > MeasureFAMIX>sum
> > nrOfVars := 0.
> > nrEmpty := 0.
> > measurements do: [ :measurement |
> > nrOfVars := nrOfVars + (measurement varSize * measurement
> > nrEmpty := nrEmpty + measurement nrEmpty + measurement
> > In Famix-SelfMeasurements on smalltalkhub
> > _______________________________________________
> > Moose-dev mailing list
> > Moose-dev at iam.unibe.ch
> > https://www.iam.unibe.ch/mailman/listinfo/moose-dev
"Every thing has its own flow"
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Pharo-dev