cue/stats: new package for getting operation statistics
The functionality is hoisted from adt, but the package should for all
practical purposes be seen as a new implementation.
Note that some of the methods are now by value. This will make it
easier to make things thread-safe in the future. We may also
opt to hide the struct fields later on. But for now, as this has been
working for a long time, we expect this to be sufficient for a while
to come.
The stats have been aggregated as experimental functionality to
the tools/flow package.
Issue #1795
Signed-off-by: Marcel van Lohuizen <mpvl@gmail.com>
Change-Id: Ifd3458d0fa03f3b2d91c50385e34e24b5a93bc70
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/542778
Reviewed-by: Paul Jolly <paul@myitcv.io>
Unity-Result: CUEcueckoo <cueckoo@cuelang.org>
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>