Comcast / Surf-N-Perf

Micro-library for gathering web page performance data

Home Page:http://comcast.github.io/Surf-N-Perf/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Single Mark Helper

JohnRiv opened this issue · comments

Since it's currently only possible to have one value for a key (see Issue #54), that results in code like this when you only want to mark a key the first time it happens:

if (!surfnperf.getMark('fetchData')) {
  surfnperf.mark('fetchData');
}

A markOnce helper method to provide that same functionality would be useful.

We should determine a plan around this & #54 before our next release.