[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MirageOS-devel] Logs



On 16 October 2015 at 11:55, Daniel BÃnzli <daniel.buenzli@xxxxxxxxxxxx> wrote:
> Le vendredi, 16 octobre 2015 Ã 11:11, Anil Madhavapeddy a Ãcrit :
>> And debugk in that pull request answers my query nicely:
>>
>> Log.debugk "received %s (%s)" @@ fun k -> k (pretty k) (pretty v)
> I prefer my version mentioned on the same page
>
>   Log.debug "received %a (%a)" pp_key k pp_value v
>
> which is the natural way of using Format. Jeremy may want to comment on the 
> performance results though.

I added some performance measurements comparing the debugk and '%a' approaches:

   https://github.com/mirage/ocaml-git/pull/130#issuecomment-149218374

and some more with an optimised ifprintf that might make it into an
ocaml/ocaml pull request at some point:

   https://github.com/mirage/ocaml-git/pull/130#issuecomment-149219411

_______________________________________________
MirageOS-devel mailing list
MirageOS-devel@xxxxxxxxxxxxxxxxxxxx
http://lists.xenproject.org/cgi-bin/mailman/listinfo/mirageos-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.