ENVY script

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

ENVY script

dmacq
Below is a work space script that will find all config maps that have purged editions and then print each name and timeStamp to the Transcript.

    | purgedNames cnt |

    cnt := 0.
    purgedNames := EmConfigurationMap purgedConfigurationMapNames.
    purgedNames do: [:each | | purgedEditions |
        purgedEditions := EmConfigurationMap purgedEditionsFor: each.
        (purgedEditions isNil or: [purgedEditions isEmpty])
            ifFalse: [
                Transcript show: 'Map: ' , each; cr.
                cnt := cnt + purgedEditions size.
                purgedEditions do: [:p |
                    Transcript  show:  '  purged edition: ' , p printString , ' with timeStamp ' ,  p timeStamp printString; cr]]].

    Transcript show: purgedNames size printString , ' maps with purged editions'; cr.
    Transcript show: cnt printString , ' purged editions';  cr


-- 
Donald [|]
A bad day in [] is better than a good day in {}.

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: ENVY script

Noschvie
Hi Donald
is there is method to delete / remove a purged edition of a config map from the library?
Thanks
Norbert

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: ENVY script

dmacq
Hi Norbert,

Purged editions are not deleted, just marked as purged.

If you want to decrease the size of your Envy library, clone it. From the docs:

"Cloning a library copies all configuration map, application, and subapplication versions--including their classes and methods--to a new library. Also, it frees up disk space by deleting all purged components from a library."

Purged, scratch, and open editions are not cloned. You must be Library Supervisor to clone a library.


-- 
Donald [|]
A bad day in [] is better than a good day in {}.


On Thursday, October 18, 2018 at 6:05:57 AM UTC-4, Norbert Schlemmer wrote:
Hi Donald
is there is method to delete / remove a purged edition of a config map from the library?
Thanks
Norbert

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: ENVY script

Brent Lin
In reply to this post by dmacq
Hi Donald,

Would you have a quick script to count the number of applications and classes for an particular config map?

Thanks in advance.

Brent

On Wednesday, October 17, 2018 at 2:14:42 PM UTC-4, Donald MacQueen wrote:
Below is a work space script that will find all config maps that have purged editions and then print each name and timeStamp to the Transcript.

    | purgedNames cnt |

    cnt := 0.
    purgedNames := EmConfigurationMap purgedConfigurationMapNames.
    purgedNames do: [:each | | purgedEditions |
        purgedEditions := EmConfigurationMap purgedEditionsFor: each.
        (purgedEditions isNil or: [purgedEditions isEmpty])
            ifFalse: [
                Transcript show: 'Map: ' , each; cr.
                cnt := cnt + purgedEditions size.
                purgedEditions do: [:p |
                    Transcript  show:  '  purged edition: ' , p printString , ' with timeStamp ' ,  p timeStamp printString; cr]]].

    Transcript show: purgedNames size printString , ' maps with purged editions'; cr.
    Transcript show: cnt printString , ' purged editions';  cr


-- 
Donald [|]
A bad day in [] is better than a good day in {}.

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: ENVY script

dmacq
Hi Brent,

| map applicationNames  mapName cnt1 cnt2 |
mapName := 'ENVY/Image Base'.
map := (EmConfigurationMap editionsFor: mapName) first.
applicationNames := map applicationNames.
Transcript show: 'Config map ', mapName, ' contains ', applicationNames size printString, ' applications' ;cr.
cnt1 := cnt2 := 0.
applicationNames do: [:each ||app  |
    app := (Smalltalk at: each asSymbol).
    Transcript show: '- Application ', each , ' has ', app defined size printString, ' defined classes and ', app extended size printString, ' extended classes';cr.
    cnt1 := cnt1 + app defined size.
    cnt2 := cnt2 + app extended size.
    app subApplications do: [:sub| "do one level of subApplications"
        Transcript show: '--  SubApplication ', sub printString, ' has ', sub defined size printString, ' defined classes and ', sub extended size printString, ' extended classes';cr.
        cnt1 := cnt1 + sub defined size.
        cnt2 := cnt2 + sub extended size..]
].
Transcript show: 'Config map ', mapName, ' contains ', cnt1  printString, ' defined classes and ', cnt2 printString, ' extended classes';cr.

I also have (somewhere) a script that counts lines of code


-- 
Donald [|]
A bad day in [] is better than a good day in {}.

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: ENVY script

Brent Lin
Thank you Donald.

On Wednesday, October 24, 2018 at 4:05:12 PM UTC-4, Donald MacQueen wrote:
Hi Brent,

| map applicationNames  mapName cnt1 cnt2 |
mapName := 'ENVY/Image Base'.
map := (EmConfigurationMap editionsFor: mapName) first.
applicationNames := map applicationNames.
Transcript show: 'Config map ', mapName, ' contains ', applicationNames size printString, ' applications' ;cr.
cnt1 := cnt2 := 0.
applicationNames do: [:each ||app  |
    app := (Smalltalk at: each asSymbol).
    Transcript show: '- Application ', each , ' has ', app defined size printString, ' defined classes and ', app extended size printString, ' extended classes';cr.
    cnt1 := cnt1 + app defined size.
    cnt2 := cnt2 + app extended size.
    app subApplications do: [:sub| "do one level of subApplications"
        Transcript show: '--  SubApplication ', sub printString, ' has ', sub defined size printString, ' defined classes and ', sub extended size printString, ' extended classes';cr.
        cnt1 := cnt1 + sub defined size.
        cnt2 := cnt2 + sub extended size..]
].
Transcript show: 'Config map ', mapName, ' contains ', cnt1  printString, ' defined classes and ', cnt2 printString, ' extended classes';cr.

I also have (somewhere) a script that counts lines of code


-- 
Donald [|]
A bad day in [] is better than a good day in {}.

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: ENVY script

Brent Lin
In reply to this post by dmacq
If you have the script to count the lines of code, it would be greatly appreciated.

Thanks,
Brent

On Wednesday, October 17, 2018 at 2:14:42 PM UTC-4, Donald MacQueen wrote:
Below is a work space script that will find all config maps that have purged editions and then print each name and timeStamp to the Transcript.

    | purgedNames cnt |

    cnt := 0.
    purgedNames := EmConfigurationMap purgedConfigurationMapNames.
    purgedNames do: [:each | | purgedEditions |
        purgedEditions := EmConfigurationMap purgedEditionsFor: each.
        (purgedEditions isNil or: [purgedEditions isEmpty])
            ifFalse: [
                Transcript show: 'Map: ' , each; cr.
                cnt := cnt + purgedEditions size.
                purgedEditions do: [:p |
                    Transcript  show:  '  purged edition: ' , p printString , ' with timeStamp ' ,  p timeStamp printString; cr]]].

    Transcript show: purgedNames size printString , ' maps with purged editions'; cr.
    Transcript show: cnt printString , ' purged editions';  cr


-- 
Donald [|]
A bad day in [] is better than a good day in {}.

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.