On Mon, Aug 23, 2010 at 3:13 PM, Simon Denier <Simon.Denier@inria.fr> wrote:

On 23 août 2010, at 14:55, Mariano Martinez Peck wrote:

> Hi. I am using Distribution Maps where I analyze an snapshot, a particular moment of my image state. I would like to be able to compare it with another moment.
>
> For example, I analyze packages and see which classes have instances for evaluating something. Something like this:
>
> ^ (self onContainers: (self listOfCorePackagesNames
>         collect: [ :each | (PackageInfo named: each) ]) elements: #classes properties: [:element | element hasUsedInstances ] )
>             render
>             open.
>
> Then, I do something different (suppose I start a seaside app) and I would like to see the difference between both distribution maps. To easily compare and know which "new" classes where used by running seaside that were not used in the first scenario.
>
> Maybe just a simple solution is to take both DM and to make a 3th with them:  check each element...if in both it is the same...them I paint with a particular color. If they are different, each one keeps its original color.
>
> What do you think? is it doable?


Certainly yes


> is there someting done about this?

No :)

Notice that there are other visualizations to display history (check Doru)? Depending on the context, it might better suit or not.

Ok....where can I find such things? Doru ?

 
You have to try to see by yourself. But, DM with a diff sounds easy and good enough.


I did a first implemenation (no more than 3 hours). Basically it extends DistributionMap and implements the message onDM1: aDistributionMao DM2: anotherDistributionMap

So you can do something like this:

    | dm1 dm2 |
   
    UnusedObjectDiscoverer current startDiscovery.
    UnusedObjectDiscoverer current stopDiscoveryAndGetStadistics.
   
    dm1 := (self onContainers: (self listOfCorePackagesNamesWithoutTests
        collect: [ :each | (PackageInfo named: each) ]) elements: #classes properties: [:element | element propertyHasUsedInstances] ).
       
    UnusedObjectDiscoverer current startDiscovery.
    Object browse.
    SystemNavigation default browseAllImplementorsOf: #printOn:.
    SystemNavigation default allSendersOf: #printOn:.
    UnusedObjectDiscoverer current stopDiscoveryAndGetStadistics.
   
    dm2 := (self onContainers: (self listOfCorePackagesNamesWithoutTests
        collect: [ :each | (PackageInfo named: each) ]) elements: #classes properties: [:element | element propertyHasUsedInstances] ).
   
    (DistributionMapComparator onDM1: dm1 DM2: dm2) render open



For those elements where the property is different, I then set the "Different" property. Look the attached screenshots.

However, I don't like very much this solution because I loose the original and the modified properties, and just put another one (Different).

any idea how to improve this?

thanks

mariano

 

--
 Simon




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