Single Mark Helper
- Dominant language
- JavaScript
- Stars
- 90
- Forks
- 20
- PR merge metrics
- No merged PRs in 30d
Description
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:
```js
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.
Contributor guide
Research direction
Start by locating the implementations of getMark and mark, then check whether the project has tests covering mark behavior. Add coverage for the requested markOnce helper and confirm it marks a key only on its first call. Review Issue #54 as part of deciding how this fits before the next release.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- performance
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100