Distribution Map diff

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Distribution Map diff

Mariano Martinez Peck
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? is there someting done about this?

Thanks

Mariano

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Distribution Map diff

Simon Denier-3

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. You have to try to see by yourself. But, DM with a diff sounds easy and good enough.


--
 Simon




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Distribution Map diff

Mariano Martinez Peck


On Mon, Aug 23, 2010 at 3:13 PM, Simon Denier <[hidden email]> 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
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev

dm1.png (99K) Download Attachment
dm2.png (99K) Download Attachment
dmResult.png (101K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Distribution Map diff

Simon Denier-3

On 27 août 2010, at 14:37, Mariano Martinez Peck wrote:



On Mon, Aug 23, 2010 at 3:13 PM, Simon Denier <[hidden email]> 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 ?


For a starter, take a look at:

(I think we still need to re-implement some Hismo viz in Pharo Moose)



 
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?


So in your comparator you don't have 2 properties anymore, but 4:
- unused
- used in the first session but not in the second
- unused in the first but used in the second
- used in both sessions

So you get 4 colors.

But in the long term, I guess you want to add more sessions, you will need more properties and this will get exponential.

So we will need to find a more scalable solution: either using color scale ( I can think of something where period = color, and age = intensity, could be fun, could also be a mess).

Or probably the easiest scalable solution will be to use a timeline layout, which would give a better impression of the history. I think that Mircea recently added such a layout in Mondrian. Mircea, can you give a small sample script? How to use MOHorizontalDominanceTreeWithTimelineLayout?

We can discuss that when you come.


But first, try to take a quick look at Doru's work on history models, metrics, and viz, to figure out what *you* want to do with such visualizations.


--
 Simon




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev