Stream: t-compiler/wg-nll

Topic: datafrog statistics

lqd (Jan 09 2019 at 23:32, on Zulip):

I finished updating the statistics PR to output a CSV file, is this more what you had in mind @nikomatsakis ? (I would like to add a test before merging, using tempdir/tempfile for example)

nikomatsakis (Jan 10 2019 at 16:59, on Zulip):

@lqd looks about right, yep!

lqd (Jan 10 2019 at 17:18, on Zulip):

re: your comment; yeah it will dump the stats as it goes. We talked about maybe keeping the stats in memory and printing the CSV after the computation is done (maybe when the iteration is dropped), and we can switch to this model if you want ? It seems nice but probably more valuable in different cases than this one: say, when the collecting/collating is performance intensive or the stats are more complicated -- whereas here it's just dumping the data and it didn't seem extremely necessary.

lqd (Jan 10 2019 at 17:19, on Zulip):

But at the same time, I'd still like to collect timing stats per variable (the duration the different operators took; if needed, under a feature flag) and this will require the other model, so maybe I should do it now ?

nikomatsakis (Jan 10 2019 at 19:23, on Zulip):

@lqd I'm not sure that collecting "in memory" is particularly useful. I think this approach you outlined looks good as a start to me. Timing information might be useful too but that'll be a bit trickier I guess

nikomatsakis (Jan 10 2019 at 19:25, on Zulip):

I'd be game to land the PR as is

lqd (Jan 10 2019 at 19:26, on Zulip):

alright thanks, do we want to try and add a little test to this ? (I did once add some timing by threading Durations around Relations, that seemed to work ok I guess)

Jake Goulding (Jan 11 2019 at 00:11, on Zulip):

(disclaimer, I don't know this code) Aren't these compatible outcomes? Have a

trait Stats {
    fn begin(&mut self) {}
    fn log_one(&mut self, ...) {}
    fn end(&mut self) {}

And implement it 2x:

impl Stats for Immediate {
    fn log_one(&mut self, ...) { eprintln!(...) }

impl Stats for Rollup {
    fn log_one(&mut self, ...) { self.stats.push(...) }

    fn end(&mut self, ...) { /* final compute and print */ }
lqd (Jan 11 2019 at 07:52, on Zulip):

oh yeah, not really incompatible per se, it was mostly a question of whether it was useful to have both or the rollup at all

Last update: Jul 02 2020 at 13:30UTC