Repository navigation
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #6459 +/- ##
==========================================
+ Coverage 84.97% 85.24% +0.27%
==========================================
Files 359 372 +13
Lines 39170 40804 +1634
Branches 11115 11702 +587
==========================================
+ Hits 33284 34784 +1500
- Misses 5449 5580 +131
- Partials 437 440 +3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
426a73d to
807d471
Compare
fba348b to
2610fec
Compare
canova
left a comment
There was a problem hiding this comment.
Let me know if my thinking is way off on the comment below. I feel like it took me a long time to understand and review, but I might be still missing somethign.
| if (newData.type === 'Network') { | ||
| if (typeof newData.domainLookupStart === 'number') { | ||
| newData.domainLookupStart += delta; | ||
| } | ||
| if (typeof newData.domainLookupEnd === 'number') { | ||
| newData.domainLookupEnd += delta; | ||
| } | ||
| if (typeof newData.connectStart === 'number') { | ||
| newData.connectStart += delta; | ||
| } | ||
| if (typeof newData.tcpConnectEnd === 'number') { | ||
| newData.tcpConnectEnd += delta; | ||
| } | ||
| if (typeof newData.secureConnectionStart === 'number') { | ||
| newData.secureConnectionStart += delta; | ||
| } | ||
| if (typeof newData.connectEnd === 'number') { | ||
| newData.connectEnd += delta; | ||
| } | ||
| if (typeof newData.requestStart === 'number') { | ||
| newData.requestStart += delta; | ||
| } | ||
| if (typeof newData.responseStart === 'number') { | ||
| newData.responseStart += delta; | ||
| } | ||
| if (typeof newData.responseEnd === 'number') { | ||
| newData.responseEnd += delta; | ||
| } | ||
| } |
There was a problem hiding this comment.
I think we can move them to the markerSchemaFrontEndOnlyWithoutPII with format: 'time'. So we don't have to hardcode them here or anywhere. We would need to do for IPC markers and network markers, right?
This way I believe we would remove the hardcoded fields from everywhere, and just shift all the things with format: 'time' which makes it more generic. I guess we wouldn't need an upgrader for this since it's all in the frontend schema, and we are essentially not changing the behavior.
There was a problem hiding this comment.
Thanks for your great suggestion, it does make sense to me! Yeah I think IPC and Network are the only ones that need that special handling. I tried implementing it this way now, please have a look when you have a chance.
Marker starts and ends, stack capture times and the counter sample range were already milliseconds since the profile start, but the other times in --json output were raw profile timestamps, offset from those by rootRange.start. View ranges and zoom results, counter buckets, thread and process lifetimes, CPU activity slices, network request starts and the page load navigation start now use the same base. rootRange stays raw. The timestamps inside a marker's payload are rebased in `data` and in `fields[].value` too, for every field that has the `time` format in the marker schema. The front-end IPC and Network schemas declare their timestamp fields as hidden `time` fields, so these are covered as well. Marker search skips `time` fields. Otherwise a search for a number would match the raw timestamps of the IPC and Network markers.
2610fec to
1e4b5e7
Compare
|
Haven't looked at the code yet, but one thing that came to my mind recently was: What happens in other places where we shift timestamps? The two I know of are profile processing, and profile merging. Especially merging I would expect to already have to have full coverage of timestamps |
Main | Deploy preview
Some times in
--jsonoutput were milliseconds since the profile start and others were raw profile timestamps. Now all of them are relative to the profile start, and onlyrootRangestays raw.This covers view ranges and zoom results, counter buckets, thread and process lifetimes, CPU activity slices, network request starts, the page load navigation start, and the timestamps inside marker payloads (
dataandfields[].value).Payload timestamps are found through the marker schema: every field with
format: 'time'is shifted. The front-end IPC and Network schemas now declare their timestamp fields as hiddentimefields for this.Marker search in the web app skips
timefields, so that a search for a number doesn't match the raw timestamps of IPC and Network markers.Closes #6458