Creates a named PerformanceEntry with entryType "measure" and adds it to the performance timeline.
Standard forms supported by JSplitter:
performance.measure(name) - measures from timestamp 0 to performance.now.
performance.measure(name, startMark) - measures from the most recent named start mark to now.
performance.measure(name, startMark, endMark) - measures between the most recent matching named marks.
performance.measure(name, options) - derives start/end times from PerformanceMeasureOptions.
performance.measure(name, {}, endMark) - measures from timestamp 0 to the named end mark.
In options, start and end may be either mark names or finite non-negative timestamps. duration may be supplied with exactly one of start or end. If an explicitly named mark does not exist, an error is thrown.
Multiple measures may use the same name. Named mark lookup always uses the most recently created matching mark.
Compatibility note: for historical JSplitter compatibility, a fourth legacyMeasureOptions argument is also accepted. This form preserves the previous JSplitter precedence rules: existing explicit startMark/endMark values take precedence, while numeric start, end, or duration options fill missing values. New code should prefer the standard forms above.
For backward compatibility, an empty positional mark name ("") is treated as omitted rather than as a mark named with an empty string.