[Pharo-dev] [Moose-dev] Some FAMIX questions

Tudor Girba tudor at tudorgirba.com
Thu Aug 29 16:11:16 EDT 2013


+100

Doru


On Thu, Aug 29, 2013 at 9:58 PM, Stéphane Ducasse <stephane.ducasse at inria.fr
> wrote:

> 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
> instvars.
> > 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
> instSize).
> >               nrEmpty := nrEmpty + measurement nrEmpty + measurement
> nrNil].
> >
> > In Famix-SelfMeasurements on smalltalkhub
> > _______________________________________________
> > Moose-dev mailing list
> > Moose-dev at iam.unibe.ch
> > https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
>
>


-- 
www.tudorgirba.com

"Every thing has its own flow"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/attachments/20130829/c1b43a74/attachment-0002.html>


More information about the Pharo-dev mailing list