Hi, I’m working on integrating Micrometer with `IO...
# arrow-contributors
d
Hi, I’m working on integrating Micrometer with
IO
. I simply want to register the time it took to execute the
IO
. I have implemented
.timed
extension function that can be executed on IO. But I also want to have the possibility to call
.timed
on a function that returns IO. And have to generate 22 versions of that method 🙂. You have probably had the same “issue” (like with
memoize
). Do you have some ready to copy solution 🙂?
r
No ready to go N arity macros yet though meta aims to solve this problem by annotating functions as polyadic and then you get the n arities code gen by the compiler
this is probably for the end of the year since it’s lower priority
and we don’t have yet a proposal syntax for it
so the question is…
d
I was not thinking on solving my problem basing on polyadic function. Also the idea looks great.
I just would like to generate those 22 functions during build. I assumed that you have some solution for codegeneration on which I could base (stricly saying - copy it)
a
d
I assumed that it was generated 🙂. Anyway I can start with a few functions (like up to 4 parameters) and let somebody else add other versions if needed. I hope that we will not reach 22 in our projects 😄.
😅 1
👌 1