Forked from w3c/performance-timeline#2 and relevant for w3c/performance-timeline#9 (comment).
It might be useful to be able to specify a payload that would be stored along with your marks or measures.
The new method signature might be:
void mark(DOMString markName, object data);
data could be whatever, say {taskid: 1, widgets: 100}
This data attribute would be persisted along with that mark and attached to the PerformanceMark interface:
interface PerformanceMark : PerformanceEntry {
object data;
};
(I don't know the correct IDL).
data could also be a DOMString. If so, I think there should be a specified string length limit, so people don't just JSON.stringify() a huge payload into it (which would be a lot less efficient than a native object).
This may help with w3c/performance-timeline#9, which discusses a "group" concept useful for any PerformanceEntry in the PerformanceTimeline. @igrigorik mentions being able to query for any entries that share an attribute via a new getEntries(DOMString attributeName, optional DOMString attributeValue) method, but a lone data attribute on UserTiming might not then be useful, unless its properties were automatically attached to the base PerformanceEntry (which I'm sure would introduce headaches with naming collisions).
Forked from w3c/performance-timeline#2 and relevant for w3c/performance-timeline#9 (comment).
It might be useful to be able to specify a payload that would be stored along with your marks or measures.
The new method signature might be:
datacould be whatever, say{taskid: 1, widgets: 100}This data attribute would be persisted along with that mark and attached to the
PerformanceMarkinterface:(I don't know the correct IDL).
datacould also be a DOMString. If so, I think there should be a specified string length limit, so people don't justJSON.stringify()a huge payload into it (which would be a lot less efficient than a native object).This may help with w3c/performance-timeline#9, which discusses a "group" concept useful for any PerformanceEntry in the PerformanceTimeline. @igrigorik mentions being able to query for any entries that share an attribute via a new
getEntries(DOMString attributeName, optional DOMString attributeValue)method, but a lonedataattribute on UserTiming might not then be useful, unless its properties were automatically attached to the base PerformanceEntry (which I'm sure would introduce headaches with naming collisions).