mikejihbe / metrics

A metrics library for Node.js
574 stars 58 forks source link

Make this library work in the browser #45

Closed pbadenski closed 6 years ago

tolbertam commented 6 years ago

Nice! Is that all this really takes? Is there a good way to test this? I'm ok with just taking your word for it, but was thinking it'd be nice if we could add a test to ensure that the library keeps working.

Also as an aside, I'd like to reimplement metrics so it wasn't dependent on timers at all (use a tick-based approach that only ticks on use and when enough time has elapsed), but that is a bigger effort than this obviously :smile:

tolbertam commented 6 years ago

Merging this now since it is non-obtrusive. I can go ahead and do a release now (with #44) as well, if you would like. I am interested if you had any ideas about testing within a browser as part of CI, but we can take care of that later.

pbadenski commented 6 years ago

100% confident it works, I've been using it in production for almost a year. Sadly, only got myself now to do this pull request - apologies.

One caveat though - I use webpack and need to add this in my config:

node: {
  net: "empty"
},

I haven't thought of testing it in the browser, but I will do some research and let you know if I got any ideas.

tolbertam commented 6 years ago

I haven't thought of testing it in the browser, but I will do some research and let you know if I got any ideas.

Cool, interested in any ideas! I'll look at this myself as well.

would be really cool if you can release this! :D

Will do, i'll deploy this shortly, thanks!

tolbertam commented 6 years ago

Released as 0.1.12, thanks again!