tracker, backend: fixup msg gen
This commit is contained in:
parent
c4ad390b3f
commit
a4f6a93c59
15 changed files with 610 additions and 209 deletions
|
|
@ -2,124 +2,125 @@
|
|||
package messages
|
||||
|
||||
const (
|
||||
MsgTimestamp = 0
|
||||
MsgSessionStart = 1
|
||||
MsgSessionEndDeprecated = 3
|
||||
MsgSetPageLocationDeprecated = 4
|
||||
MsgSetViewportSize = 5
|
||||
MsgSetViewportScroll = 6
|
||||
MsgCreateDocument = 7
|
||||
MsgCreateElementNode = 8
|
||||
MsgCreateTextNode = 9
|
||||
MsgMoveNode = 10
|
||||
MsgRemoveNode = 11
|
||||
MsgSetNodeAttribute = 12
|
||||
MsgRemoveNodeAttribute = 13
|
||||
MsgSetNodeData = 14
|
||||
MsgSetCSSData = 15
|
||||
MsgSetNodeScroll = 16
|
||||
MsgSetInputTarget = 17
|
||||
MsgSetInputValue = 18
|
||||
MsgSetInputChecked = 19
|
||||
MsgMouseMove = 20
|
||||
MsgNetworkRequestDeprecated = 21
|
||||
MsgConsoleLog = 22
|
||||
MsgPageLoadTiming = 23
|
||||
MsgPageRenderTiming = 24
|
||||
MsgJSExceptionDeprecated = 25
|
||||
MsgIntegrationEvent = 26
|
||||
MsgCustomEvent = 27
|
||||
MsgUserID = 28
|
||||
MsgUserAnonymousID = 29
|
||||
MsgMetadata = 30
|
||||
MsgPageEventDeprecated = 31
|
||||
MsgInputEvent = 32
|
||||
MsgPageEvent = 33
|
||||
MsgStringDictGlobal = 34
|
||||
MsgSetNodeAttributeDictGlobal = 35
|
||||
MsgCSSInsertRule = 37
|
||||
MsgCSSDeleteRule = 38
|
||||
MsgFetch = 39
|
||||
MsgProfiler = 40
|
||||
MsgOTable = 41
|
||||
MsgStateAction = 42
|
||||
MsgReduxDeprecated = 44
|
||||
MsgVuex = 45
|
||||
MsgMobX = 46
|
||||
MsgNgRx = 47
|
||||
MsgGraphQLDeprecated = 48
|
||||
MsgPerformanceTrack = 49
|
||||
MsgStringDictDeprecated = 50
|
||||
MsgSetNodeAttributeDictDeprecated = 51
|
||||
MsgStringDict = 43
|
||||
MsgSetNodeAttributeDict = 52
|
||||
MsgResourceTimingDeprecated = 53
|
||||
MsgConnectionInformation = 54
|
||||
MsgSetPageVisibility = 55
|
||||
MsgPerformanceTrackAggr = 56
|
||||
MsgLoadFontFace = 57
|
||||
MsgSetNodeFocus = 58
|
||||
MsgLongTask = 59
|
||||
MsgSetNodeAttributeURLBased = 60
|
||||
MsgSetCSSDataURLBased = 61
|
||||
MsgIssueEventDeprecated = 62
|
||||
MsgTechnicalInfo = 63
|
||||
MsgCustomIssue = 64
|
||||
MsgAssetCache = 66
|
||||
MsgCSSInsertRuleURLBased = 67
|
||||
MsgMouseClick = 68
|
||||
MsgMouseClickDeprecated = 69
|
||||
MsgCreateIFrameDocument = 70
|
||||
MsgAdoptedSSReplaceURLBased = 71
|
||||
MsgAdoptedSSReplace = 72
|
||||
MsgAdoptedSSInsertRuleURLBased = 73
|
||||
MsgAdoptedSSInsertRule = 74
|
||||
MsgAdoptedSSDeleteRule = 75
|
||||
MsgAdoptedSSAddOwner = 76
|
||||
MsgAdoptedSSRemoveOwner = 77
|
||||
MsgJSException = 78
|
||||
MsgZustand = 79
|
||||
MsgBatchMeta = 80
|
||||
MsgBatchMetadata = 81
|
||||
MsgPartitionedMessage = 82
|
||||
MsgNetworkRequest = 83
|
||||
MsgWSChannel = 84
|
||||
MsgLongAnimationTask = 89
|
||||
MsgInputChange = 112
|
||||
MsgSelectionChange = 113
|
||||
MsgMouseThrashing = 114
|
||||
MsgUnbindNodes = 115
|
||||
MsgResourceTiming = 116
|
||||
MsgTabChange = 117
|
||||
MsgTabData = 118
|
||||
MsgCanvasNode = 119
|
||||
MsgTagTrigger = 120
|
||||
MsgRedux = 121
|
||||
MsgSetPageLocation = 122
|
||||
MsgGraphQL = 123
|
||||
MsgWebVitals = 124
|
||||
MsgIssueEvent = 125
|
||||
MsgSessionEnd = 126
|
||||
MsgSessionSearch = 127
|
||||
MsgMobileSessionStart = 90
|
||||
MsgMobileSessionEnd = 91
|
||||
MsgMobileMetadata = 92
|
||||
MsgMobileEvent = 93
|
||||
MsgMobileUserID = 94
|
||||
MsgMobileUserAnonymousID = 95
|
||||
MsgMobileScreenChanges = 96
|
||||
MsgMobileCrash = 97
|
||||
MsgMobileViewComponentEvent = 98
|
||||
MsgMobileClickEvent = 100
|
||||
MsgMobileInputEvent = 101
|
||||
MsgMobilePerformanceEvent = 102
|
||||
MsgMobileLog = 103
|
||||
MsgMobileInternalError = 104
|
||||
MsgMobileNetworkCall = 105
|
||||
MsgMobileSwipeEvent = 106
|
||||
MsgMobileBatchMeta = 107
|
||||
MsgMobilePerformanceAggregated = 110
|
||||
MsgMobileIssueEvent = 111
|
||||
MsgTimestamp = 0
|
||||
MsgSessionStart = 1
|
||||
MsgSessionEndDeprecated = 3
|
||||
MsgSetPageLocationDeprecated = 4
|
||||
MsgSetViewportSize = 5
|
||||
MsgSetViewportScroll = 6
|
||||
MsgCreateDocument = 7
|
||||
MsgCreateElementNode = 8
|
||||
MsgCreateTextNode = 9
|
||||
MsgMoveNode = 10
|
||||
MsgRemoveNode = 11
|
||||
MsgSetNodeAttribute = 12
|
||||
MsgRemoveNodeAttribute = 13
|
||||
MsgSetNodeData = 14
|
||||
MsgSetCSSData = 15
|
||||
MsgSetNodeScroll = 16
|
||||
MsgSetInputTarget = 17
|
||||
MsgSetInputValue = 18
|
||||
MsgSetInputChecked = 19
|
||||
MsgMouseMove = 20
|
||||
MsgNetworkRequestDeprecated = 21
|
||||
MsgConsoleLog = 22
|
||||
MsgPageLoadTiming = 23
|
||||
MsgPageRenderTiming = 24
|
||||
MsgJSExceptionDeprecated = 25
|
||||
MsgIntegrationEvent = 26
|
||||
MsgCustomEvent = 27
|
||||
MsgUserID = 28
|
||||
MsgUserAnonymousID = 29
|
||||
MsgMetadata = 30
|
||||
MsgPageEventDeprecated = 31
|
||||
MsgInputEvent = 32
|
||||
MsgPageEvent = 33
|
||||
MsgStringDictGlobal = 34
|
||||
MsgSetNodeAttributeDictGlobal = 35
|
||||
MsgCSSInsertRule = 37
|
||||
MsgCSSDeleteRule = 38
|
||||
MsgFetch = 39
|
||||
MsgProfiler = 40
|
||||
MsgOTable = 41
|
||||
MsgStateAction = 42
|
||||
MsgReduxDeprecated = 44
|
||||
MsgVuex = 45
|
||||
MsgMobX = 46
|
||||
MsgNgRx = 47
|
||||
MsgGraphQLDeprecated = 48
|
||||
MsgPerformanceTrack = 49
|
||||
MsgStringDictDeprecated = 50
|
||||
MsgSetNodeAttributeDictDeprecated = 51
|
||||
MsgStringDict = 43
|
||||
MsgSetNodeAttributeDict = 52
|
||||
MsgResourceTimingDeprecatedDeprecated = 53
|
||||
MsgConnectionInformation = 54
|
||||
MsgSetPageVisibility = 55
|
||||
MsgPerformanceTrackAggr = 56
|
||||
MsgLoadFontFace = 57
|
||||
MsgSetNodeFocus = 58
|
||||
MsgLongTask = 59
|
||||
MsgSetNodeAttributeURLBased = 60
|
||||
MsgSetCSSDataURLBased = 61
|
||||
MsgIssueEventDeprecated = 62
|
||||
MsgTechnicalInfo = 63
|
||||
MsgCustomIssue = 64
|
||||
MsgAssetCache = 66
|
||||
MsgCSSInsertRuleURLBased = 67
|
||||
MsgMouseClick = 68
|
||||
MsgMouseClickDeprecated = 69
|
||||
MsgCreateIFrameDocument = 70
|
||||
MsgAdoptedSSReplaceURLBased = 71
|
||||
MsgAdoptedSSReplace = 72
|
||||
MsgAdoptedSSInsertRuleURLBased = 73
|
||||
MsgAdoptedSSInsertRule = 74
|
||||
MsgAdoptedSSDeleteRule = 75
|
||||
MsgAdoptedSSAddOwner = 76
|
||||
MsgAdoptedSSRemoveOwner = 77
|
||||
MsgJSException = 78
|
||||
MsgZustand = 79
|
||||
MsgBatchMeta = 80
|
||||
MsgBatchMetadata = 81
|
||||
MsgPartitionedMessage = 82
|
||||
MsgNetworkRequest = 83
|
||||
MsgWSChannel = 84
|
||||
MsgResourceTiming = 85
|
||||
MsgLongAnimationTask = 89
|
||||
MsgInputChange = 112
|
||||
MsgSelectionChange = 113
|
||||
MsgMouseThrashing = 114
|
||||
MsgUnbindNodes = 115
|
||||
MsgResourceTimingDeprecated = 116
|
||||
MsgTabChange = 117
|
||||
MsgTabData = 118
|
||||
MsgCanvasNode = 119
|
||||
MsgTagTrigger = 120
|
||||
MsgRedux = 121
|
||||
MsgSetPageLocation = 122
|
||||
MsgGraphQL = 123
|
||||
MsgWebVitals = 124
|
||||
MsgIssueEvent = 125
|
||||
MsgSessionEnd = 126
|
||||
MsgSessionSearch = 127
|
||||
MsgMobileSessionStart = 90
|
||||
MsgMobileSessionEnd = 91
|
||||
MsgMobileMetadata = 92
|
||||
MsgMobileEvent = 93
|
||||
MsgMobileUserID = 94
|
||||
MsgMobileUserAnonymousID = 95
|
||||
MsgMobileScreenChanges = 96
|
||||
MsgMobileCrash = 97
|
||||
MsgMobileViewComponentEvent = 98
|
||||
MsgMobileClickEvent = 100
|
||||
MsgMobileInputEvent = 101
|
||||
MsgMobilePerformanceEvent = 102
|
||||
MsgMobileLog = 103
|
||||
MsgMobileInternalError = 104
|
||||
MsgMobileNetworkCall = 105
|
||||
MsgMobileSwipeEvent = 106
|
||||
MsgMobileBatchMeta = 107
|
||||
MsgMobilePerformanceAggregated = 110
|
||||
MsgMobileIssueEvent = 111
|
||||
)
|
||||
|
||||
type Timestamp struct {
|
||||
|
|
@ -2295,6 +2296,59 @@ func (msg *WSChannel) TypeID() int {
|
|||
return 84
|
||||
}
|
||||
|
||||
type ResourceTiming struct {
|
||||
message
|
||||
Timestamp uint64
|
||||
Duration uint64
|
||||
TTFB uint64
|
||||
HeaderSize uint64
|
||||
EncodedBodySize uint64
|
||||
DecodedBodySize uint64
|
||||
URL string
|
||||
Initiator string
|
||||
TransferredSize uint64
|
||||
Cached bool
|
||||
Queueing uint64
|
||||
DnsLookup uint64
|
||||
InitialConnection uint64
|
||||
SSL uint64
|
||||
ContentDownload uint64
|
||||
Total uint64
|
||||
Stalled uint64
|
||||
}
|
||||
|
||||
func (msg *ResourceTiming) Encode() []byte {
|
||||
buf := make([]byte, 171+len(msg.URL)+len(msg.Initiator))
|
||||
buf[0] = 85
|
||||
p := 1
|
||||
p = WriteUint(msg.Timestamp, buf, p)
|
||||
p = WriteUint(msg.Duration, buf, p)
|
||||
p = WriteUint(msg.TTFB, buf, p)
|
||||
p = WriteUint(msg.HeaderSize, buf, p)
|
||||
p = WriteUint(msg.EncodedBodySize, buf, p)
|
||||
p = WriteUint(msg.DecodedBodySize, buf, p)
|
||||
p = WriteString(msg.URL, buf, p)
|
||||
p = WriteString(msg.Initiator, buf, p)
|
||||
p = WriteUint(msg.TransferredSize, buf, p)
|
||||
p = WriteBoolean(msg.Cached, buf, p)
|
||||
p = WriteUint(msg.Queueing, buf, p)
|
||||
p = WriteUint(msg.DnsLookup, buf, p)
|
||||
p = WriteUint(msg.InitialConnection, buf, p)
|
||||
p = WriteUint(msg.SSL, buf, p)
|
||||
p = WriteUint(msg.ContentDownload, buf, p)
|
||||
p = WriteUint(msg.Total, buf, p)
|
||||
p = WriteUint(msg.Stalled, buf, p)
|
||||
return buf[:p]
|
||||
}
|
||||
|
||||
func (msg *ResourceTiming) Decode() Message {
|
||||
return msg
|
||||
}
|
||||
|
||||
func (msg *ResourceTiming) TypeID() int {
|
||||
return 85
|
||||
}
|
||||
|
||||
type LongAnimationTask struct {
|
||||
message
|
||||
Name string
|
||||
|
|
|
|||
|
|
@ -1419,6 +1419,63 @@ func DecodeWSChannel(reader BytesReader) (Message, error) {
|
|||
return msg, err
|
||||
}
|
||||
|
||||
func DecodeResourceTiming(reader BytesReader) (Message, error) {
|
||||
var err error = nil
|
||||
msg := &ResourceTiming{}
|
||||
if msg.Timestamp, err = reader.ReadUint(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if msg.Duration, err = reader.ReadUint(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if msg.TTFB, err = reader.ReadUint(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if msg.HeaderSize, err = reader.ReadUint(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if msg.EncodedBodySize, err = reader.ReadUint(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if msg.DecodedBodySize, err = reader.ReadUint(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if msg.URL, err = reader.ReadString(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if msg.Initiator, err = reader.ReadString(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if msg.TransferredSize, err = reader.ReadUint(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if msg.Cached, err = reader.ReadBoolean(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if msg.Queueing, err = reader.ReadUint(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if msg.DnsLookup, err = reader.ReadUint(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if msg.InitialConnection, err = reader.ReadUint(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if msg.SSL, err = reader.ReadUint(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if msg.ContentDownload, err = reader.ReadUint(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if msg.Total, err = reader.ReadUint(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if msg.Stalled, err = reader.ReadUint(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return msg, err
|
||||
}
|
||||
|
||||
func DecodeLongAnimationTask(reader BytesReader) (Message, error) {
|
||||
var err error = nil
|
||||
msg := &LongAnimationTask{}
|
||||
|
|
@ -1440,9 +1497,6 @@ func DecodeLongAnimationTask(reader BytesReader) (Message, error) {
|
|||
if msg.Scripts, err = reader.ReadString(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if msg.Stalled, err = reader.ReadUint(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return msg, err
|
||||
}
|
||||
|
||||
|
|
@ -2275,6 +2329,8 @@ func ReadMessage(t uint64, reader BytesReader) (Message, error) {
|
|||
return DecodeNetworkRequest(reader)
|
||||
case 84:
|
||||
return DecodeWSChannel(reader)
|
||||
case 85:
|
||||
return DecodeResourceTiming(reader)
|
||||
case 89:
|
||||
return DecodeLongAnimationTask(reader)
|
||||
case 112:
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ class CreateDocument(Message):
|
|||
__id__ = 7
|
||||
|
||||
def __init__(self, ):
|
||||
|
||||
|
||||
|
||||
|
||||
class CreateElementNode(Message):
|
||||
|
|
@ -806,6 +806,29 @@ class WSChannel(Message):
|
|||
self.message_type = message_type
|
||||
|
||||
|
||||
class ResourceTiming(Message):
|
||||
__id__ = 85
|
||||
|
||||
def __init__(self, timestamp, duration, ttfb, header_size, encoded_body_size, decoded_body_size, url, initiator, transferred_size, cached, queueing, dns_lookup, initial_connection, ssl, content_download, total, stalled):
|
||||
self.timestamp = timestamp
|
||||
self.duration = duration
|
||||
self.ttfb = ttfb
|
||||
self.header_size = header_size
|
||||
self.encoded_body_size = encoded_body_size
|
||||
self.decoded_body_size = decoded_body_size
|
||||
self.url = url
|
||||
self.initiator = initiator
|
||||
self.transferred_size = transferred_size
|
||||
self.cached = cached
|
||||
self.queueing = queueing
|
||||
self.dns_lookup = dns_lookup
|
||||
self.initial_connection = initial_connection
|
||||
self.ssl = ssl
|
||||
self.content_download = content_download
|
||||
self.total = total
|
||||
self.stalled = stalled
|
||||
|
||||
|
||||
class LongAnimationTask(Message):
|
||||
__id__ = 89
|
||||
|
||||
|
|
@ -1177,3 +1200,5 @@ class MobileIssueEvent(Message):
|
|||
self.context_string = context_string
|
||||
self.context = context
|
||||
self.payload = payload
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -104,11 +104,11 @@ cdef class SetViewportScroll(PyMessage):
|
|||
|
||||
cdef class CreateDocument(PyMessage):
|
||||
cdef public int __id__
|
||||
|
||||
|
||||
|
||||
def __init__(self, ):
|
||||
self.__id__ = 7
|
||||
|
||||
|
||||
|
||||
|
||||
cdef class CreateElementNode(PyMessage):
|
||||
|
|
@ -1200,6 +1200,47 @@ cdef class WSChannel(PyMessage):
|
|||
self.message_type = message_type
|
||||
|
||||
|
||||
cdef class ResourceTiming(PyMessage):
|
||||
cdef public int __id__
|
||||
cdef public unsigned long timestamp
|
||||
cdef public unsigned long duration
|
||||
cdef public unsigned long ttfb
|
||||
cdef public unsigned long header_size
|
||||
cdef public unsigned long encoded_body_size
|
||||
cdef public unsigned long decoded_body_size
|
||||
cdef public str url
|
||||
cdef public str initiator
|
||||
cdef public unsigned long transferred_size
|
||||
cdef public bint cached
|
||||
cdef public unsigned long queueing
|
||||
cdef public unsigned long dns_lookup
|
||||
cdef public unsigned long initial_connection
|
||||
cdef public unsigned long ssl
|
||||
cdef public unsigned long content_download
|
||||
cdef public unsigned long total
|
||||
cdef public unsigned long stalled
|
||||
|
||||
def __init__(self, unsigned long timestamp, unsigned long duration, unsigned long ttfb, unsigned long header_size, unsigned long encoded_body_size, unsigned long decoded_body_size, str url, str initiator, unsigned long transferred_size, bint cached, unsigned long queueing, unsigned long dns_lookup, unsigned long initial_connection, unsigned long ssl, unsigned long content_download, unsigned long total, unsigned long stalled):
|
||||
self.__id__ = 85
|
||||
self.timestamp = timestamp
|
||||
self.duration = duration
|
||||
self.ttfb = ttfb
|
||||
self.header_size = header_size
|
||||
self.encoded_body_size = encoded_body_size
|
||||
self.decoded_body_size = decoded_body_size
|
||||
self.url = url
|
||||
self.initiator = initiator
|
||||
self.transferred_size = transferred_size
|
||||
self.cached = cached
|
||||
self.queueing = queueing
|
||||
self.dns_lookup = dns_lookup
|
||||
self.initial_connection = initial_connection
|
||||
self.ssl = ssl
|
||||
self.content_download = content_download
|
||||
self.total = total
|
||||
self.stalled = stalled
|
||||
|
||||
|
||||
cdef class LongAnimationTask(PyMessage):
|
||||
cdef public int __id__
|
||||
cdef public str name
|
||||
|
|
@ -1764,3 +1805,5 @@ cdef class MobileIssueEvent(PyMessage):
|
|||
self.context_string = context_string
|
||||
self.context = context
|
||||
self.payload = payload
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -144,7 +144,7 @@ class MessageCodec(Codec):
|
|||
|
||||
if message_id == 7:
|
||||
return CreateDocument(
|
||||
|
||||
|
||||
)
|
||||
|
||||
if message_id == 8:
|
||||
|
|
@ -729,6 +729,27 @@ class MessageCodec(Codec):
|
|||
message_type=self.read_string(reader)
|
||||
)
|
||||
|
||||
if message_id == 85:
|
||||
return ResourceTiming(
|
||||
timestamp=self.read_uint(reader),
|
||||
duration=self.read_uint(reader),
|
||||
ttfb=self.read_uint(reader),
|
||||
header_size=self.read_uint(reader),
|
||||
encoded_body_size=self.read_uint(reader),
|
||||
decoded_body_size=self.read_uint(reader),
|
||||
url=self.read_string(reader),
|
||||
initiator=self.read_string(reader),
|
||||
transferred_size=self.read_uint(reader),
|
||||
cached=self.read_boolean(reader),
|
||||
queueing=self.read_uint(reader),
|
||||
dns_lookup=self.read_uint(reader),
|
||||
initial_connection=self.read_uint(reader),
|
||||
ssl=self.read_uint(reader),
|
||||
content_download=self.read_uint(reader),
|
||||
total=self.read_uint(reader),
|
||||
stalled=self.read_uint(reader)
|
||||
)
|
||||
|
||||
if message_id == 89:
|
||||
return LongAnimationTask(
|
||||
name=self.read_string(reader),
|
||||
|
|
@ -1029,3 +1050,4 @@ class MessageCodec(Codec):
|
|||
context=self.read_string(reader),
|
||||
payload=self.read_string(reader)
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -242,7 +242,7 @@ cdef class MessageCodec:
|
|||
|
||||
if message_id == 7:
|
||||
return CreateDocument(
|
||||
|
||||
|
||||
)
|
||||
|
||||
if message_id == 8:
|
||||
|
|
@ -827,6 +827,27 @@ cdef class MessageCodec:
|
|||
message_type=self.read_string(reader)
|
||||
)
|
||||
|
||||
if message_id == 85:
|
||||
return ResourceTiming(
|
||||
timestamp=self.read_uint(reader),
|
||||
duration=self.read_uint(reader),
|
||||
ttfb=self.read_uint(reader),
|
||||
header_size=self.read_uint(reader),
|
||||
encoded_body_size=self.read_uint(reader),
|
||||
decoded_body_size=self.read_uint(reader),
|
||||
url=self.read_string(reader),
|
||||
initiator=self.read_string(reader),
|
||||
transferred_size=self.read_uint(reader),
|
||||
cached=self.read_boolean(reader),
|
||||
queueing=self.read_uint(reader),
|
||||
dns_lookup=self.read_uint(reader),
|
||||
initial_connection=self.read_uint(reader),
|
||||
ssl=self.read_uint(reader),
|
||||
content_download=self.read_uint(reader),
|
||||
total=self.read_uint(reader),
|
||||
stalled=self.read_uint(reader)
|
||||
)
|
||||
|
||||
if message_id == 89:
|
||||
return LongAnimationTask(
|
||||
name=self.read_string(reader),
|
||||
|
|
@ -1127,3 +1148,4 @@ cdef class MessageCodec:
|
|||
context=self.read_string(reader),
|
||||
payload=self.read_string(reader)
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -733,6 +733,46 @@ export default class RawMessageReader extends PrimitiveReader {
|
|||
};
|
||||
}
|
||||
|
||||
case 85: {
|
||||
const timestamp = this.readUint(); if (timestamp === null) { return resetPointer() }
|
||||
const duration = this.readUint(); if (duration === null) { return resetPointer() }
|
||||
const ttfb = this.readUint(); if (ttfb === null) { return resetPointer() }
|
||||
const headerSize = this.readUint(); if (headerSize === null) { return resetPointer() }
|
||||
const encodedBodySize = this.readUint(); if (encodedBodySize === null) { return resetPointer() }
|
||||
const decodedBodySize = this.readUint(); if (decodedBodySize === null) { return resetPointer() }
|
||||
const url = this.readString(); if (url === null) { return resetPointer() }
|
||||
const initiator = this.readString(); if (initiator === null) { return resetPointer() }
|
||||
const transferredSize = this.readUint(); if (transferredSize === null) { return resetPointer() }
|
||||
const cached = this.readBoolean(); if (cached === null) { return resetPointer() }
|
||||
const queueing = this.readUint(); if (queueing === null) { return resetPointer() }
|
||||
const dnsLookup = this.readUint(); if (dnsLookup === null) { return resetPointer() }
|
||||
const initialConnection = this.readUint(); if (initialConnection === null) { return resetPointer() }
|
||||
const ssl = this.readUint(); if (ssl === null) { return resetPointer() }
|
||||
const contentDownload = this.readUint(); if (contentDownload === null) { return resetPointer() }
|
||||
const total = this.readUint(); if (total === null) { return resetPointer() }
|
||||
const stalled = this.readUint(); if (stalled === null) { return resetPointer() }
|
||||
return {
|
||||
tp: MType.ResourceTiming,
|
||||
timestamp,
|
||||
duration,
|
||||
ttfb,
|
||||
headerSize,
|
||||
encodedBodySize,
|
||||
decodedBodySize,
|
||||
url,
|
||||
initiator,
|
||||
transferredSize,
|
||||
cached,
|
||||
queueing,
|
||||
dnsLookup,
|
||||
initialConnection,
|
||||
ssl,
|
||||
contentDownload,
|
||||
total,
|
||||
stalled,
|
||||
};
|
||||
}
|
||||
|
||||
case 89: {
|
||||
const name = this.readString(); if (name === null) { return resetPointer() }
|
||||
const duration = this.readInt(); if (duration === null) { return resetPointer() }
|
||||
|
|
|
|||
|
|
@ -7,4 +7,4 @@ const IOS_TYPES = [90,91,92,93,94,95,96,97,98,100,101,102,103,104,105,106,107,11
|
|||
const DOM_TYPES = [0,4,5,6,7,8,9,10,11,12,13,14,15,16,18,19,20,34,35,37,38,49,50,51,43,52,54,55,57,58,59,60,61,67,68,69,70,71,72,73,74,75,76,77,113,114,117,118,119,122]
|
||||
export function isDOMType(t: MType) {
|
||||
return DOM_TYPES.includes(t)
|
||||
}
|
||||
}
|
||||
|
|
@ -62,6 +62,7 @@ import type {
|
|||
RawZustand,
|
||||
RawNetworkRequest,
|
||||
RawWsChannel,
|
||||
RawResourceTiming,
|
||||
RawLongAnimationTask,
|
||||
RawSelectionChange,
|
||||
RawMouseThrashing,
|
||||
|
|
@ -160,7 +161,7 @@ export type StringDict = RawStringDict & Timed
|
|||
|
||||
export type SetNodeAttributeDict = RawSetNodeAttributeDict & Timed
|
||||
|
||||
export type ResourceTimingDeprecated = RawResourceTimingDeprecated & Timed
|
||||
export type ResourceTimingDeprecatedDeprecated = RawResourceTimingDeprecatedDeprecated & Timed
|
||||
|
||||
export type ConnectionInformation = RawConnectionInformation & Timed
|
||||
|
||||
|
|
@ -204,13 +205,15 @@ export type NetworkRequest = RawNetworkRequest & Timed
|
|||
|
||||
export type WsChannel = RawWsChannel & Timed
|
||||
|
||||
export type ResourceTiming = RawResourceTiming & Timed
|
||||
|
||||
export type LongAnimationTask = RawLongAnimationTask & Timed
|
||||
|
||||
export type SelectionChange = RawSelectionChange & Timed
|
||||
|
||||
export type MouseThrashing = RawMouseThrashing & Timed
|
||||
|
||||
export type ResourceTiming = RawResourceTiming & Timed
|
||||
export type ResourceTimingDeprecated = RawResourceTimingDeprecated & Timed
|
||||
|
||||
export type TabChange = RawTabChange & Timed
|
||||
|
||||
|
|
@ -245,3 +248,4 @@ export type MobileNetworkCall = RawMobileNetworkCall & Timed
|
|||
export type MobileSwipeEvent = RawMobileSwipeEvent & Timed
|
||||
|
||||
export type MobileIssueEvent = RawMobileIssueEvent & Timed
|
||||
|
||||
|
|
|
|||
|
|
@ -60,6 +60,7 @@ export const enum MType {
|
|||
Zustand = 79,
|
||||
NetworkRequest = 83,
|
||||
WsChannel = 84,
|
||||
ResourceTiming = 85,
|
||||
LongAnimationTask = 89,
|
||||
SelectionChange = 113,
|
||||
MouseThrashing = 114,
|
||||
|
|
@ -330,8 +331,8 @@ export interface RawSetNodeAttributeDict {
|
|||
value: string,
|
||||
}
|
||||
|
||||
export interface RawResourceTimingDeprecated {
|
||||
tp: MType.ResourceTimingDeprecated,
|
||||
export interface RawResourceTimingDeprecatedDeprecated {
|
||||
tp: MType.ResourceTimingDeprecatedDeprecated,
|
||||
timestamp: number,
|
||||
duration: number,
|
||||
ttfb: number,
|
||||
|
|
@ -499,6 +500,27 @@ export interface RawWsChannel {
|
|||
messageType: string,
|
||||
}
|
||||
|
||||
export interface RawResourceTiming {
|
||||
tp: MType.ResourceTiming,
|
||||
timestamp: number,
|
||||
duration: number,
|
||||
ttfb: number,
|
||||
headerSize: number,
|
||||
encodedBodySize: number,
|
||||
decodedBodySize: number,
|
||||
url: string,
|
||||
initiator: string,
|
||||
transferredSize: number,
|
||||
cached: boolean,
|
||||
queueing: number,
|
||||
dnsLookup: number,
|
||||
initialConnection: number,
|
||||
ssl: number,
|
||||
contentDownload: number,
|
||||
total: number,
|
||||
stalled: number,
|
||||
}
|
||||
|
||||
export interface RawLongAnimationTask {
|
||||
tp: MType.LongAnimationTask,
|
||||
name: string,
|
||||
|
|
@ -521,8 +543,8 @@ export interface RawMouseThrashing {
|
|||
timestamp: number,
|
||||
}
|
||||
|
||||
export interface RawResourceTiming {
|
||||
tp: MType.ResourceTiming,
|
||||
export interface RawResourceTimingDeprecated {
|
||||
tp: MType.ResourceTimingDeprecated,
|
||||
timestamp: number,
|
||||
duration: number,
|
||||
ttfb: number,
|
||||
|
|
@ -673,4 +695,4 @@ export interface RawMobileIssueEvent {
|
|||
}
|
||||
|
||||
|
||||
export type RawMessage = RawTimestamp | RawSetPageLocationDeprecated | RawSetViewportSize | RawSetViewportScroll | RawCreateDocument | RawCreateElementNode | RawCreateTextNode | RawMoveNode | RawRemoveNode | RawSetNodeAttribute | RawRemoveNodeAttribute | RawSetNodeData | RawSetCssData | RawSetNodeScroll | RawSetInputValue | RawSetInputChecked | RawMouseMove | RawNetworkRequestDeprecated | RawConsoleLog | RawStringDictGlobal | RawSetNodeAttributeDictGlobal | RawCssInsertRule | RawCssDeleteRule | RawFetch | RawProfiler | RawOTable | RawReduxDeprecated | RawVuex | RawMobX | RawNgRx | RawGraphQlDeprecated | RawPerformanceTrack | RawStringDictDeprecated | RawSetNodeAttributeDictDeprecated | RawStringDict | RawSetNodeAttributeDict | RawResourceTimingDeprecated | RawConnectionInformation | RawSetPageVisibility | RawLoadFontFace | RawSetNodeFocus | RawLongTask | RawSetNodeAttributeURLBased | RawSetCssDataURLBased | RawCssInsertRuleURLBased | RawMouseClick | RawMouseClickDeprecated | RawCreateIFrameDocument | RawAdoptedSsReplaceURLBased | RawAdoptedSsReplace | RawAdoptedSsInsertRuleURLBased | RawAdoptedSsInsertRule | RawAdoptedSsDeleteRule | RawAdoptedSsAddOwner | RawAdoptedSsRemoveOwner | RawZustand | RawNetworkRequest | RawWsChannel | RawLongAnimationTask | RawSelectionChange | RawMouseThrashing | RawResourceTiming | RawTabChange | RawTabData | RawCanvasNode | RawTagTrigger | RawRedux | RawSetPageLocation | RawGraphQl | RawMobileEvent | RawMobileScreenChanges | RawMobileClickEvent | RawMobileInputEvent | RawMobilePerformanceEvent | RawMobileLog | RawMobileInternalError | RawMobileNetworkCall | RawMobileSwipeEvent | RawMobileIssueEvent;
|
||||
export type RawMessage = RawTimestamp | RawSetPageLocationDeprecated | RawSetViewportSize | RawSetViewportScroll | RawCreateDocument | RawCreateElementNode | RawCreateTextNode | RawMoveNode | RawRemoveNode | RawSetNodeAttribute | RawRemoveNodeAttribute | RawSetNodeData | RawSetCssData | RawSetNodeScroll | RawSetInputValue | RawSetInputChecked | RawMouseMove | RawNetworkRequestDeprecated | RawConsoleLog | RawStringDictGlobal | RawSetNodeAttributeDictGlobal | RawCssInsertRule | RawCssDeleteRule | RawFetch | RawProfiler | RawOTable | RawReduxDeprecated | RawVuex | RawMobX | RawNgRx | RawGraphQlDeprecated | RawPerformanceTrack | RawStringDictDeprecated | RawSetNodeAttributeDictDeprecated | RawStringDict | RawSetNodeAttributeDict | RawResourceTimingDeprecatedDeprecated | RawConnectionInformation | RawSetPageVisibility | RawLoadFontFace | RawSetNodeFocus | RawLongTask | RawSetNodeAttributeURLBased | RawSetCssDataURLBased | RawCssInsertRuleURLBased | RawMouseClick | RawMouseClickDeprecated | RawCreateIFrameDocument | RawAdoptedSsReplaceURLBased | RawAdoptedSsReplace | RawAdoptedSsInsertRuleURLBased | RawAdoptedSsInsertRule | RawAdoptedSsDeleteRule | RawAdoptedSsAddOwner | RawAdoptedSsRemoveOwner | RawZustand | RawNetworkRequest | RawWsChannel | RawResourceTiming | RawLongAnimationTask | RawSelectionChange | RawMouseThrashing | RawResourceTimingDeprecated | RawTabChange | RawTabData | RawCanvasNode | RawTagTrigger | RawRedux | RawSetPageLocation | RawGraphQl | RawMobileEvent | RawMobileScreenChanges | RawMobileClickEvent | RawMobileInputEvent | RawMobilePerformanceEvent | RawMobileLog | RawMobileInternalError | RawMobileNetworkCall | RawMobileSwipeEvent | RawMobileIssueEvent;
|
||||
|
|
|
|||
|
|
@ -61,6 +61,7 @@ export const TP_MAP = {
|
|||
79: MType.Zustand,
|
||||
83: MType.NetworkRequest,
|
||||
84: MType.WsChannel,
|
||||
85: MType.ResourceTiming,
|
||||
89: MType.LongAnimationTask,
|
||||
113: MType.SelectionChange,
|
||||
114: MType.MouseThrashing,
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ type TrSetViewportScroll = [
|
|||
|
||||
type TrCreateDocument = [
|
||||
type: 7,
|
||||
|
||||
|
||||
]
|
||||
|
||||
type TrCreateElementNode = [
|
||||
|
|
@ -489,6 +489,27 @@ type TrWSChannel = [
|
|||
messageType: string,
|
||||
]
|
||||
|
||||
type TrResourceTiming = [
|
||||
type: 85,
|
||||
timestamp: number,
|
||||
duration: number,
|
||||
ttfb: number,
|
||||
headerSize: number,
|
||||
encodedBodySize: number,
|
||||
decodedBodySize: number,
|
||||
url: string,
|
||||
initiator: string,
|
||||
transferredSize: number,
|
||||
cached: boolean,
|
||||
queueing: number,
|
||||
dnsLookup: number,
|
||||
initialConnection: number,
|
||||
ssl: number,
|
||||
contentDownload: number,
|
||||
total: number,
|
||||
stalled: number,
|
||||
]
|
||||
|
||||
type TrLongAnimationTask = [
|
||||
type: 89,
|
||||
name: string,
|
||||
|
|
@ -593,18 +614,18 @@ type TrWebVitals = [
|
|||
]
|
||||
|
||||
|
||||
export type TrackerMessage = TrTimestamp | TrSetPageLocationDeprecated | TrSetViewportSize | TrSetViewportScroll | TrCreateDocument | TrCreateElementNode | TrCreateTextNode | TrMoveNode | TrRemoveNode | TrSetNodeAttribute | TrRemoveNodeAttribute | TrSetNodeData | TrSetNodeScroll | TrSetInputTarget | TrSetInputValue | TrSetInputChecked | TrMouseMove | TrNetworkRequestDeprecated | TrConsoleLog | TrPageLoadTiming | TrPageRenderTiming | TrCustomEvent | TrUserID | TrUserAnonymousID | TrMetadata | TrStringDictGlobal | TrSetNodeAttributeDictGlobal | TrCSSInsertRule | TrCSSDeleteRule | TrFetch | TrProfiler | TrOTable | TrStateAction | TrReduxDeprecated | TrVuex | TrMobX | TrNgRx | TrGraphQLDeprecated | TrPerformanceTrack | TrStringDictDeprecated | TrSetNodeAttributeDictDeprecated | TrStringDict | TrSetNodeAttributeDict | TrResourceTimingDeprecated | TrConnectionInformation | TrSetPageVisibility | TrLoadFontFace | TrSetNodeFocus | TrLongTask | TrSetNodeAttributeURLBased | TrSetCSSDataURLBased | TrTechnicalInfo | TrCustomIssue | TrCSSInsertRuleURLBased | TrMouseClick | TrMouseClickDeprecated | TrCreateIFrameDocument | TrAdoptedSSReplaceURLBased | TrAdoptedSSInsertRuleURLBased | TrAdoptedSSDeleteRule | TrAdoptedSSAddOwner | TrAdoptedSSRemoveOwner | TrJSException | TrZustand | TrBatchMetadata | TrPartitionedMessage | TrNetworkRequest | TrWSChannel | TrLongAnimationTask | TrInputChange | TrSelectionChange | TrMouseThrashing | TrUnbindNodes | TrResourceTiming | TrTabChange | TrTabData | TrCanvasNode | TrTagTrigger | TrRedux | TrSetPageLocation | TrGraphQL | TrWebVitals
|
||||
export type TrackerMessage = TrTimestamp | TrSetPageLocationDeprecated | TrSetViewportSize | TrSetViewportScroll | TrCreateDocument | TrCreateElementNode | TrCreateTextNode | TrMoveNode | TrRemoveNode | TrSetNodeAttribute | TrRemoveNodeAttribute | TrSetNodeData | TrSetNodeScroll | TrSetInputTarget | TrSetInputValue | TrSetInputChecked | TrMouseMove | TrNetworkRequestDeprecated | TrConsoleLog | TrPageLoadTiming | TrPageRenderTiming | TrCustomEvent | TrUserID | TrUserAnonymousID | TrMetadata | TrStringDictGlobal | TrSetNodeAttributeDictGlobal | TrCSSInsertRule | TrCSSDeleteRule | TrFetch | TrProfiler | TrOTable | TrStateAction | TrReduxDeprecated | TrVuex | TrMobX | TrNgRx | TrGraphQLDeprecated | TrPerformanceTrack | TrStringDictDeprecated | TrSetNodeAttributeDictDeprecated | TrStringDict | TrSetNodeAttributeDict | TrResourceTimingDeprecatedDeprecated | TrConnectionInformation | TrSetPageVisibility | TrLoadFontFace | TrSetNodeFocus | TrLongTask | TrSetNodeAttributeURLBased | TrSetCSSDataURLBased | TrTechnicalInfo | TrCustomIssue | TrCSSInsertRuleURLBased | TrMouseClick | TrMouseClickDeprecated | TrCreateIFrameDocument | TrAdoptedSSReplaceURLBased | TrAdoptedSSInsertRuleURLBased | TrAdoptedSSDeleteRule | TrAdoptedSSAddOwner | TrAdoptedSSRemoveOwner | TrJSException | TrZustand | TrBatchMetadata | TrPartitionedMessage | TrNetworkRequest | TrWSChannel | TrResourceTiming | TrLongAnimationTask | TrInputChange | TrSelectionChange | TrMouseThrashing | TrUnbindNodes | TrResourceTimingDeprecated | TrTabChange | TrTabData | TrCanvasNode | TrTagTrigger | TrRedux | TrSetPageLocation | TrGraphQL | TrWebVitals
|
||||
|
||||
export default function translate(tMsg: TrackerMessage): RawMessage | null {
|
||||
switch(tMsg[0]) {
|
||||
|
||||
|
||||
case 0: {
|
||||
return {
|
||||
tp: MType.Timestamp,
|
||||
timestamp: tMsg[1],
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
case 4: {
|
||||
return {
|
||||
tp: MType.SetPageLocationDeprecated,
|
||||
|
|
@ -613,7 +634,7 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
|
|||
navigationStart: tMsg[3],
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
case 5: {
|
||||
return {
|
||||
tp: MType.SetViewportSize,
|
||||
|
|
@ -621,7 +642,7 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
|
|||
height: tMsg[2],
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
case 6: {
|
||||
return {
|
||||
tp: MType.SetViewportScroll,
|
||||
|
|
@ -629,14 +650,14 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
|
|||
y: tMsg[2],
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
case 7: {
|
||||
return {
|
||||
tp: MType.CreateDocument,
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
case 8: {
|
||||
return {
|
||||
tp: MType.CreateElementNode,
|
||||
|
|
@ -647,7 +668,7 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
|
|||
svg: tMsg[5],
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
case 9: {
|
||||
return {
|
||||
tp: MType.CreateTextNode,
|
||||
|
|
@ -656,7 +677,7 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
|
|||
index: tMsg[3],
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
case 10: {
|
||||
return {
|
||||
tp: MType.MoveNode,
|
||||
|
|
@ -665,14 +686,14 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
|
|||
index: tMsg[3],
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
case 11: {
|
||||
return {
|
||||
tp: MType.RemoveNode,
|
||||
id: tMsg[1],
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
case 12: {
|
||||
return {
|
||||
tp: MType.SetNodeAttribute,
|
||||
|
|
@ -681,7 +702,7 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
|
|||
value: tMsg[3],
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
case 13: {
|
||||
return {
|
||||
tp: MType.RemoveNodeAttribute,
|
||||
|
|
@ -689,7 +710,7 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
|
|||
name: tMsg[2],
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
case 14: {
|
||||
return {
|
||||
tp: MType.SetNodeData,
|
||||
|
|
@ -697,7 +718,7 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
|
|||
data: tMsg[2],
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
case 16: {
|
||||
return {
|
||||
tp: MType.SetNodeScroll,
|
||||
|
|
@ -706,7 +727,7 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
|
|||
y: tMsg[3],
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
case 18: {
|
||||
return {
|
||||
tp: MType.SetInputValue,
|
||||
|
|
@ -715,7 +736,7 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
|
|||
mask: tMsg[3],
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
case 19: {
|
||||
return {
|
||||
tp: MType.SetInputChecked,
|
||||
|
|
@ -723,7 +744,7 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
|
|||
checked: tMsg[2],
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
case 20: {
|
||||
return {
|
||||
tp: MType.MouseMove,
|
||||
|
|
@ -731,7 +752,7 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
|
|||
y: tMsg[2],
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
case 21: {
|
||||
return {
|
||||
tp: MType.NetworkRequestDeprecated,
|
||||
|
|
@ -745,7 +766,7 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
|
|||
duration: tMsg[8],
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
case 22: {
|
||||
return {
|
||||
tp: MType.ConsoleLog,
|
||||
|
|
@ -753,7 +774,7 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
|
|||
value: tMsg[2],
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
case 34: {
|
||||
return {
|
||||
tp: MType.StringDictGlobal,
|
||||
|
|
@ -761,7 +782,7 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
|
|||
value: tMsg[2],
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
case 35: {
|
||||
return {
|
||||
tp: MType.SetNodeAttributeDictGlobal,
|
||||
|
|
@ -770,7 +791,7 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
|
|||
value: tMsg[3],
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
case 37: {
|
||||
return {
|
||||
tp: MType.CssInsertRule,
|
||||
|
|
@ -779,7 +800,7 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
|
|||
index: tMsg[3],
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
case 38: {
|
||||
return {
|
||||
tp: MType.CssDeleteRule,
|
||||
|
|
@ -787,7 +808,7 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
|
|||
index: tMsg[2],
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
case 39: {
|
||||
return {
|
||||
tp: MType.Fetch,
|
||||
|
|
@ -800,7 +821,7 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
|
|||
duration: tMsg[7],
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
case 40: {
|
||||
return {
|
||||
tp: MType.Profiler,
|
||||
|
|
@ -810,7 +831,7 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
|
|||
result: tMsg[4],
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
case 41: {
|
||||
return {
|
||||
tp: MType.OTable,
|
||||
|
|
@ -818,7 +839,7 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
|
|||
value: tMsg[2],
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
case 44: {
|
||||
return {
|
||||
tp: MType.ReduxDeprecated,
|
||||
|
|
@ -827,7 +848,7 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
|
|||
duration: tMsg[3],
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
case 45: {
|
||||
return {
|
||||
tp: MType.Vuex,
|
||||
|
|
@ -835,7 +856,7 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
|
|||
state: tMsg[2],
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
case 46: {
|
||||
return {
|
||||
tp: MType.MobX,
|
||||
|
|
@ -843,7 +864,7 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
|
|||
payload: tMsg[2],
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
case 47: {
|
||||
return {
|
||||
tp: MType.NgRx,
|
||||
|
|
@ -852,7 +873,7 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
|
|||
duration: tMsg[3],
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
case 48: {
|
||||
return {
|
||||
tp: MType.GraphQlDeprecated,
|
||||
|
|
@ -863,7 +884,7 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
|
|||
duration: tMsg[5],
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
case 49: {
|
||||
return {
|
||||
tp: MType.PerformanceTrack,
|
||||
|
|
@ -873,7 +894,7 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
|
|||
usedJSHeapSize: tMsg[4],
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
case 50: {
|
||||
return {
|
||||
tp: MType.StringDictDeprecated,
|
||||
|
|
@ -881,7 +902,7 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
|
|||
value: tMsg[2],
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
case 51: {
|
||||
return {
|
||||
tp: MType.SetNodeAttributeDictDeprecated,
|
||||
|
|
@ -890,7 +911,7 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
|
|||
valueKey: tMsg[3],
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
case 43: {
|
||||
return {
|
||||
tp: MType.StringDict,
|
||||
|
|
@ -898,7 +919,7 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
|
|||
value: tMsg[2],
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
case 52: {
|
||||
return {
|
||||
tp: MType.SetNodeAttributeDict,
|
||||
|
|
@ -907,7 +928,7 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
|
|||
value: tMsg[3],
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
case 53: {
|
||||
return {
|
||||
tp: MType.ResourceTimingDeprecatedDeprecated,
|
||||
|
|
@ -921,7 +942,7 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
|
|||
initiator: tMsg[8],
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
case 54: {
|
||||
return {
|
||||
tp: MType.ConnectionInformation,
|
||||
|
|
@ -929,14 +950,14 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
|
|||
type: tMsg[2],
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
case 55: {
|
||||
return {
|
||||
tp: MType.SetPageVisibility,
|
||||
hidden: tMsg[1],
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
case 57: {
|
||||
return {
|
||||
tp: MType.LoadFontFace,
|
||||
|
|
@ -946,14 +967,14 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
|
|||
descriptors: tMsg[4],
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
case 58: {
|
||||
return {
|
||||
tp: MType.SetNodeFocus,
|
||||
id: tMsg[1],
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
case 59: {
|
||||
return {
|
||||
tp: MType.LongTask,
|
||||
|
|
@ -966,7 +987,7 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
|
|||
containerName: tMsg[7],
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
case 60: {
|
||||
return {
|
||||
tp: MType.SetNodeAttributeURLBased,
|
||||
|
|
@ -976,7 +997,7 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
|
|||
baseURL: tMsg[4],
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
case 61: {
|
||||
return {
|
||||
tp: MType.SetCssDataURLBased,
|
||||
|
|
@ -985,7 +1006,7 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
|
|||
baseURL: tMsg[3],
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
case 67: {
|
||||
return {
|
||||
tp: MType.CssInsertRuleURLBased,
|
||||
|
|
@ -995,7 +1016,7 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
|
|||
baseURL: tMsg[4],
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
case 68: {
|
||||
return {
|
||||
tp: MType.MouseClick,
|
||||
|
|
@ -1007,7 +1028,7 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
|
|||
normalizedY: tMsg[6],
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
case 69: {
|
||||
return {
|
||||
tp: MType.MouseClickDeprecated,
|
||||
|
|
@ -1017,7 +1038,7 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
|
|||
selector: tMsg[4],
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
case 70: {
|
||||
return {
|
||||
tp: MType.CreateIFrameDocument,
|
||||
|
|
@ -1025,7 +1046,7 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
|
|||
id: tMsg[2],
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
case 71: {
|
||||
return {
|
||||
tp: MType.AdoptedSsReplaceURLBased,
|
||||
|
|
@ -1034,7 +1055,7 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
|
|||
baseURL: tMsg[3],
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
case 73: {
|
||||
return {
|
||||
tp: MType.AdoptedSsInsertRuleURLBased,
|
||||
|
|
@ -1044,7 +1065,7 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
|
|||
baseURL: tMsg[4],
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
case 75: {
|
||||
return {
|
||||
tp: MType.AdoptedSsDeleteRule,
|
||||
|
|
@ -1052,7 +1073,7 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
|
|||
index: tMsg[2],
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
case 76: {
|
||||
return {
|
||||
tp: MType.AdoptedSsAddOwner,
|
||||
|
|
@ -1060,7 +1081,7 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
|
|||
id: tMsg[2],
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
case 77: {
|
||||
return {
|
||||
tp: MType.AdoptedSsRemoveOwner,
|
||||
|
|
@ -1068,7 +1089,7 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
|
|||
id: tMsg[2],
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
case 79: {
|
||||
return {
|
||||
tp: MType.Zustand,
|
||||
|
|
@ -1076,7 +1097,7 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
|
|||
state: tMsg[2],
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
case 83: {
|
||||
return {
|
||||
tp: MType.NetworkRequest,
|
||||
|
|
@ -1091,7 +1112,7 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
|
|||
transferredBodySize: tMsg[9],
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
case 84: {
|
||||
return {
|
||||
tp: MType.WsChannel,
|
||||
|
|
@ -1103,7 +1124,30 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
|
|||
messageType: tMsg[6],
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
case 85: {
|
||||
return {
|
||||
tp: MType.ResourceTiming,
|
||||
timestamp: tMsg[1],
|
||||
duration: tMsg[2],
|
||||
ttfb: tMsg[3],
|
||||
headerSize: tMsg[4],
|
||||
encodedBodySize: tMsg[5],
|
||||
decodedBodySize: tMsg[6],
|
||||
url: tMsg[7],
|
||||
initiator: tMsg[8],
|
||||
transferredSize: tMsg[9],
|
||||
cached: tMsg[10],
|
||||
queueing: tMsg[11],
|
||||
dnsLookup: tMsg[12],
|
||||
initialConnection: tMsg[13],
|
||||
ssl: tMsg[14],
|
||||
contentDownload: tMsg[15],
|
||||
total: tMsg[16],
|
||||
stalled: tMsg[17],
|
||||
}
|
||||
}
|
||||
|
||||
case 89: {
|
||||
return {
|
||||
tp: MType.LongAnimationTask,
|
||||
|
|
@ -1115,7 +1159,7 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
|
|||
scripts: tMsg[6],
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
case 113: {
|
||||
return {
|
||||
tp: MType.SelectionChange,
|
||||
|
|
@ -1124,14 +1168,14 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
|
|||
selection: tMsg[3],
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
case 114: {
|
||||
return {
|
||||
tp: MType.MouseThrashing,
|
||||
timestamp: tMsg[1],
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
case 116: {
|
||||
return {
|
||||
tp: MType.ResourceTimingDeprecated,
|
||||
|
|
@ -1147,21 +1191,21 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
|
|||
cached: tMsg[10],
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
case 117: {
|
||||
return {
|
||||
tp: MType.TabChange,
|
||||
tabId: tMsg[1],
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
case 118: {
|
||||
return {
|
||||
tp: MType.TabData,
|
||||
tabId: tMsg[1],
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
case 119: {
|
||||
return {
|
||||
tp: MType.CanvasNode,
|
||||
|
|
@ -1169,14 +1213,14 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
|
|||
timestamp: tMsg[2],
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
case 120: {
|
||||
return {
|
||||
tp: MType.TagTrigger,
|
||||
tagId: tMsg[1],
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
case 121: {
|
||||
return {
|
||||
tp: MType.Redux,
|
||||
|
|
@ -1186,7 +1230,7 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
|
|||
actionTime: tMsg[4],
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
case 122: {
|
||||
return {
|
||||
tp: MType.SetPageLocation,
|
||||
|
|
@ -1196,7 +1240,7 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
|
|||
documentTitle: tMsg[4],
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
case 123: {
|
||||
return {
|
||||
tp: MType.GraphQl,
|
||||
|
|
@ -1207,7 +1251,7 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
|
|||
duration: tMsg[5],
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
default:
|
||||
return null
|
||||
}
|
||||
|
|
|
|||
|
|
@ -70,6 +70,7 @@ export declare const enum Type {
|
|||
PartitionedMessage = 82,
|
||||
NetworkRequest = 83,
|
||||
WSChannel = 84,
|
||||
ResourceTiming = 85,
|
||||
LongAnimationTask = 89,
|
||||
InputChange = 112,
|
||||
SelectionChange = 113,
|
||||
|
|
@ -113,7 +114,7 @@ export type SetViewportScroll = [
|
|||
|
||||
export type CreateDocument = [
|
||||
/*type:*/ Type.CreateDocument,
|
||||
|
||||
|
||||
]
|
||||
|
||||
export type CreateElementNode = [
|
||||
|
|
@ -571,6 +572,27 @@ export type WSChannel = [
|
|||
/*messageType:*/ string,
|
||||
]
|
||||
|
||||
export type ResourceTiming = [
|
||||
/*type:*/ Type.ResourceTiming,
|
||||
/*timestamp:*/ number,
|
||||
/*duration:*/ number,
|
||||
/*ttfb:*/ number,
|
||||
/*headerSize:*/ number,
|
||||
/*encodedBodySize:*/ number,
|
||||
/*decodedBodySize:*/ number,
|
||||
/*url:*/ string,
|
||||
/*initiator:*/ string,
|
||||
/*transferredSize:*/ number,
|
||||
/*cached:*/ boolean,
|
||||
/*queueing:*/ number,
|
||||
/*dnsLookup:*/ number,
|
||||
/*initialConnection:*/ number,
|
||||
/*ssl:*/ number,
|
||||
/*contentDownload:*/ number,
|
||||
/*total:*/ number,
|
||||
/*stalled:*/ number,
|
||||
]
|
||||
|
||||
export type LongAnimationTask = [
|
||||
/*type:*/ Type.LongAnimationTask,
|
||||
/*name:*/ string,
|
||||
|
|
@ -675,5 +697,5 @@ export type WebVitals = [
|
|||
]
|
||||
|
||||
|
||||
type Message = Timestamp | SetPageLocationDeprecated | SetViewportSize | SetViewportScroll | CreateDocument | CreateElementNode | CreateTextNode | MoveNode | RemoveNode | SetNodeAttribute | RemoveNodeAttribute | SetNodeData | SetNodeScroll | SetInputTarget | SetInputValue | SetInputChecked | MouseMove | NetworkRequestDeprecated | ConsoleLog | PageLoadTiming | PageRenderTiming | CustomEvent | UserID | UserAnonymousID | Metadata | StringDictGlobal | SetNodeAttributeDictGlobal | CSSInsertRule | CSSDeleteRule | Fetch | Profiler | OTable | StateAction | ReduxDeprecated | Vuex | MobX | NgRx | GraphQLDeprecated | PerformanceTrack | StringDictDeprecated | SetNodeAttributeDictDeprecated | StringDict | SetNodeAttributeDict | ResourceTimingDeprecated | ConnectionInformation | SetPageVisibility | LoadFontFace | SetNodeFocus | LongTask | SetNodeAttributeURLBased | SetCSSDataURLBased | TechnicalInfo | CustomIssue | CSSInsertRuleURLBased | MouseClick | MouseClickDeprecated | CreateIFrameDocument | AdoptedSSReplaceURLBased | AdoptedSSInsertRuleURLBased | AdoptedSSDeleteRule | AdoptedSSAddOwner | AdoptedSSRemoveOwner | JSException | Zustand | BatchMetadata | PartitionedMessage | NetworkRequest | WSChannel | LongAnimationTask | InputChange | SelectionChange | MouseThrashing | UnbindNodes | ResourceTiming | TabChange | TabData | CanvasNode | TagTrigger | Redux | SetPageLocation | GraphQL | WebVitals
|
||||
type Message = Timestamp | SetPageLocationDeprecated | SetViewportSize | SetViewportScroll | CreateDocument | CreateElementNode | CreateTextNode | MoveNode | RemoveNode | SetNodeAttribute | RemoveNodeAttribute | SetNodeData | SetNodeScroll | SetInputTarget | SetInputValue | SetInputChecked | MouseMove | NetworkRequestDeprecated | ConsoleLog | PageLoadTiming | PageRenderTiming | CustomEvent | UserID | UserAnonymousID | Metadata | StringDictGlobal | SetNodeAttributeDictGlobal | CSSInsertRule | CSSDeleteRule | Fetch | Profiler | OTable | StateAction | ReduxDeprecated | Vuex | MobX | NgRx | GraphQLDeprecated | PerformanceTrack | StringDictDeprecated | SetNodeAttributeDictDeprecated | StringDict | SetNodeAttributeDict | ResourceTimingDeprecatedDeprecated | ConnectionInformation | SetPageVisibility | LoadFontFace | SetNodeFocus | LongTask | SetNodeAttributeURLBased | SetCSSDataURLBased | TechnicalInfo | CustomIssue | CSSInsertRuleURLBased | MouseClick | MouseClickDeprecated | CreateIFrameDocument | AdoptedSSReplaceURLBased | AdoptedSSInsertRuleURLBased | AdoptedSSDeleteRule | AdoptedSSAddOwner | AdoptedSSRemoveOwner | JSException | Zustand | BatchMetadata | PartitionedMessage | NetworkRequest | WSChannel | ResourceTiming | LongAnimationTask | InputChange | SelectionChange | MouseThrashing | UnbindNodes | ResourceTimingDeprecated | TabChange | TabData | CanvasNode | TagTrigger | Redux | SetPageLocation | GraphQL | WebVitals
|
||||
export default Message
|
||||
|
|
|
|||
|
|
@ -50,11 +50,11 @@ export function SetViewportScroll(
|
|||
}
|
||||
|
||||
export function CreateDocument(
|
||||
|
||||
|
||||
): Messages.CreateDocument {
|
||||
return [
|
||||
Messages.Type.CreateDocument,
|
||||
|
||||
|
||||
]
|
||||
}
|
||||
|
||||
|
|
@ -905,6 +905,47 @@ export function WSChannel(
|
|||
]
|
||||
}
|
||||
|
||||
export function ResourceTiming(
|
||||
timestamp: number,
|
||||
duration: number,
|
||||
ttfb: number,
|
||||
headerSize: number,
|
||||
encodedBodySize: number,
|
||||
decodedBodySize: number,
|
||||
url: string,
|
||||
initiator: string,
|
||||
transferredSize: number,
|
||||
cached: boolean,
|
||||
queueing: number,
|
||||
dnsLookup: number,
|
||||
initialConnection: number,
|
||||
ssl: number,
|
||||
contentDownload: number,
|
||||
total: number,
|
||||
stalled: number,
|
||||
): Messages.ResourceTiming {
|
||||
return [
|
||||
Messages.Type.ResourceTiming,
|
||||
timestamp,
|
||||
duration,
|
||||
ttfb,
|
||||
headerSize,
|
||||
encodedBodySize,
|
||||
decodedBodySize,
|
||||
url,
|
||||
initiator,
|
||||
transferredSize,
|
||||
cached,
|
||||
queueing,
|
||||
dnsLookup,
|
||||
initialConnection,
|
||||
ssl,
|
||||
contentDownload,
|
||||
total,
|
||||
stalled,
|
||||
]
|
||||
}
|
||||
|
||||
export function LongAnimationTask(
|
||||
name: string,
|
||||
duration: number,
|
||||
|
|
@ -1096,3 +1137,4 @@ export function WebVitals(
|
|||
value,
|
||||
]
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ export default class MessageEncoder extends PrimitiveEncoder {
|
|||
break
|
||||
|
||||
case Messages.Type.CreateDocument:
|
||||
return true
|
||||
return true
|
||||
break
|
||||
|
||||
case Messages.Type.CreateElementNode:
|
||||
|
|
@ -282,6 +282,10 @@ export default class MessageEncoder extends PrimitiveEncoder {
|
|||
return this.string(msg[1]) && this.string(msg[2]) && this.string(msg[3]) && this.uint(msg[4]) && this.string(msg[5]) && this.string(msg[6])
|
||||
break
|
||||
|
||||
case Messages.Type.ResourceTiming:
|
||||
return this.uint(msg[1]) && this.uint(msg[2]) && this.uint(msg[3]) && this.uint(msg[4]) && this.uint(msg[5]) && this.uint(msg[6]) && this.string(msg[7]) && this.string(msg[8]) && this.uint(msg[9]) && this.boolean(msg[10]) && this.uint(msg[11]) && this.uint(msg[12]) && this.uint(msg[13]) && this.uint(msg[14]) && this.uint(msg[15]) && this.uint(msg[16]) && this.uint(msg[17])
|
||||
break
|
||||
|
||||
case Messages.Type.LongAnimationTask:
|
||||
return this.string(msg[1]) && this.int(msg[2]) && this.int(msg[3]) && this.int(msg[4]) && this.int(msg[5]) && this.string(msg[6])
|
||||
break
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue