ebidel / appmetrics.js

A small (< 1kb) library for measuring things in your web app and reporting the results to Google Analytics.
Apache License 2.0
1.37k stars 67 forks source link

Fetching the most recent entry from the performance array #7

Open gokatz opened 7 years ago

gokatz commented 7 years ago

if the user has made more than one measurement for the given event. Can we pop and return the last entered performance entry? Though it is not an issue, I think, returning the last entry will be flexible. Thus, opening this issue.

ebidel commented 7 years ago

Good call. Or maybe you should always get an array?

On Thu, Mar 23, 2017, 1:15 PM Gokul Kathirvel notifications@github.com wrote:

if the user has made more than one measurement for the given event. Can we pop and return the last entered performance entry?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ebidel/appmetrics.js/issues/7, or mute the thread https://github.com/notifications/unsubscribe-auth/AAOigFcW4Of5qQ0xXC4iK_TUiokEk_Xqks5rotLmgaJpZM4MnTfA .

gokatz commented 7 years ago

yeah... We should, I think. Users will be able to get the duration array at any time without having to fetch the duration property every time while measuring a metric. How about supporting both getDurationArray and getRecentDuration ??