Make Measure.print_stats work like ksprintf
commit1a2d2d3b965ca75eec60b26d081016b4f657e631
authorGabe Levi <gabe@fb.com>
Thu, 21 Sep 2017 20:01:02 +0000 (21 13:01 -0700)
committerHhvm Bot <hhvm-bot@users.noreply.github.com>
Thu, 21 Sep 2017 20:13:24 +0000 (21 13:13 -0700)
tree27421eefb899348f247255ebadeb424570462e9d
parent3f1021b3f518874ab5f7549bdd73fbc54af5ec03
Make Measure.print_stats work like ksprintf

Summary:
While investigating why Flow's `files_to_infer` was slow for large code bases, I used `Measure` to time various bits. At the end, I wanted to have it print via `Hh_logger`. This seemed like the easiest way. Now you can do

  Measure.print_stats ~print_raw:(fun s -> Hh_logger.debug "%s" s) ();

Reviewed By: samwgoldman

Differential Revision: D5863550

fbshipit-source-id: fda169ac7028c593eed7c2c9cc110df8d71dd017
hphp/hack/src/utils/measure.ml
hphp/hack/src/utils/measure.mli