[m-rev.] for review: add value-threshold of top procedures to deep profiler.

Peter Wang novalazy at gmail.com
Tue Sep 25 11:32:08 AEST 2007


On 2007-09-24, Paul Bone <pbone at csse.unimelb.edu.au> wrote:
> 
> For review by anyone.
> 
> Estimated hours taken: 1.5
> 
> Branches: main
> 
> Changes to the deep profiler: Added ability to select top procedures based on
> a raw threshold rather than a percentage.  I've added new links in the main
> screen of the mdprof_cgi program demonstrating this feature.
> 

> Index: deep_profiler/top_procs.m
> ===================================================================
> RCS file: /home/mercury/mercury1/repository/mercury/deep_profiler/top_procs.m,v
> retrieving revision 1.10
> diff -u -r1.10 top_procs.m
> --- deep_profiler/top_procs.m	1 Dec 2006 15:03:47 -0000	1.10
> +++ deep_profiler/top_procs.m	24 Sep 2007 12:34:31 -0000
> @@ -94,7 +94,22 @@
>              )
>          ;
>              Limit = threshold(Threshold),
> -            find_threshold_predicate(Sort, InclDesc,
> +            find_threshold_percent_predicate(Sort, InclDesc,
> +                ThresholdCompatible, RawThresholdPred),
> +            (
> +                ThresholdCompatible = no,
> +                MaybeTopPSIs = error("bad threshold specification")
> +            ;
> +                ThresholdCompatible = yes,
> +                ThresholdPred = (pred(PSI::in) is semidet :-
> +                    RawThresholdPred(Deep, Threshold, PSI)
> +                ),
> +                list.takewhile(ThresholdPred, DescendingPSIs, TopPSIs, _),

You can use currying here.

There are some overlong lines in the diff.

Peter

--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list