[m-rev.] diff: add library routines for controlling profiling

Ian MacLarty maclarty at csse.unimelb.edu.au
Wed Sep 27 16:59:26 AEST 2006


On Wed, Sep 27, 2006 at 08:19:41AM +0200, Peter Ross wrote:
> Hi,
> 
> 
> ===================================================================
> 
> 
> Estimated hours taken: 1
> Branches: main
> 
> library/benchmarking.m:
> 	Programmatically turn profiling on and off.
> 
> 
> Index: library/benchmarking.m
> ===================================================================
...
> +    %
> +    % Turn off or on the collection of all profiling statistics.
> +    %

I think you should give a more detailed description.  You should at
least mention what grades this has any effect in.

> +:- pred turn_off_profiling(io::di, io::uo) is det.
> +:- pred turn_on_profiling(io::di, io::uo) is det.
> +
> +:- impure pred turn_off_profiling is det.
> +:- impure pred turn_on_profiling is det.
> +

My personal opinion is that the impure versions are completely
unnecessary now that we have trace goals, and they only serve to
confuse users and encourage abuse of the impurity system (since usually
you'd have to give a false promise_pure to avoid the impurity
propogating all the way up to main).

Ian.
--------------------------------------------------------------------------
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