wrapr icon indicating copy to clipboard operation
wrapr copied to clipboard

Feature Request: Option to enable benchmarking on pipes

Open latot opened this issue 7 months ago • 1 comments

Hi all!, I really like this lib, I practically replaced magrittr with it.

Now, after some time playing and everything, I think is very important in languages like R be able to know the timing on the lines.

R is not "uniform", has a lot of operations where you change a little how to do something and impact a lot on the performance.

So, I was thinking would be great, a way to get the benchmarks, get the time of every line, would be great so measure performance and know which lines took more time to focus on improve the code.

I was thinking like:

options(wrapr_pipe_benchmark = TRUE)

This is the basis of the idea, there is still some points.

  • How to collect/show the data
  • There must be a way to handle deep, benchmarks on one function, more functions, per function

I know in order for a full benchmark, there is one missed point, and is create an operator to replace <- to handle a similar behavior, but, we can also do funny things like f(x) %.>% . and get the same values :3

Thx!

latot avatar Nov 14 '23 20:11 latot