Skip to content

Conversation

@sgaim
Copy link
Contributor

@sgaim sgaim commented Feb 15, 2024

Not having the TsMrangeEntry exposed to users of the library makes it impossible to manually create instances of TsMrange. This makes testing difficult as the TsMrange cannot be mocked. To test functions that return something like Vec<TsMrange<u64, f64>> (an mrange from each shard in a cluster), you have to do something like change the return type to Vec<Vec<Timeseries>> where Timeseries is a new struct. Then you are forced to copy all the TsMrangeEntry values over to these new structs, which is a wildly unnecessary performance hit.

I see that TsMrangeEntry is already public so I'm hoping someone simply forgot to add pub use it!

@tompro tompro merged commit c1d88e2 into tompro:master Feb 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants