+100

Doru


On Thu, Aug 29, 2013 at 9:58 PM, Stéphane Ducasse <stephane.duca...@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 <step...@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-...@iam.unibe.ch
> > https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
>
>


-- 
www.tudorgirba.com

"Every thing has its own flow"

Reply via email to