rust-lang / datafrog

A lightweight Datalog engine in Rust
Apache License 2.0
796 stars 43 forks source link

Add simple profiling statistics #5

Open lqd opened 6 years ago

lqd commented 6 years ago

It could be interesting to have simple statistics, for example behind a feature flag, of the number of tuples and the time it took to merge and create them, for Relations and/of Variables.

There are commented out Drop impls in the code, e.g here as an example of the way to add the final tuple counts statistic.

Similarly, a Duration could be added to the merged relations, updating it in the operator functions, to display the time it took to create those tuples, as described a bit more here by Frank.