Documentation
¶
Index ¶
- type DecoderMetrics
- type DiskIOMetrics
- type ResolverMetrics
- type Tracker
- func (t *Tracker) Finalize()
- func (t *Tracker) RecordAbstractDecoder(name string, duration time.Duration)
- func (t *Tracker) RecordCustomDecoder(name string, duration time.Duration)
- func (t *Tracker) RecordDPI(duration time.Duration)
- func (t *Tracker) RecordDiskSync(fileName string, duration time.Duration)
- func (t *Tracker) RecordDiskWrite(fileName string, duration time.Duration, bytesWritten int64)
- func (t *Tracker) RecordGoPacketDecoder(layerType string, duration time.Duration)
- func (t *Tracker) RecordPacketDecoding(duration time.Duration)
- func (t *Tracker) RecordReassembly(duration time.Duration)
- func (t *Tracker) RecordResolver(name string, duration time.Duration, cacheHit bool)
- func (t *Tracker) RecordStreamDecoder(name string, duration time.Duration)
- func (t *Tracker) SetTotalPacketsAndBytes(packets, bytes int64)
- func (t *Tracker) UpdateDecoderRecords(decoderType, name string, records, bytes int64)
- func (t *Tracker) WriteReport(filename string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DecoderMetrics ¶
type DecoderMetrics struct {
Name string
TotalNs int64 // Total time in nanoseconds
Count int64 // Number of invocations
Records int64 // Number of records produced
BytesOut int64 // Bytes written for this decoder
}
DecoderMetrics tracks metrics for a specific decoder
type DiskIOMetrics ¶
type DiskIOMetrics struct {
FileName string
WriteCount int64 // Number of write operations
WriteNs int64 // Total time in nanoseconds for writes
BytesOut int64 // Total bytes written
SyncCount int64 // Number of sync operations
SyncNs int64 // Total time in nanoseconds for syncs
}
DiskIOMetrics tracks disk I/O metrics for a specific file/type
type ResolverMetrics ¶
type ResolverMetrics struct {
Name string
TotalNs int64 // Total time in nanoseconds
Count int64 // Number of lookups
HitCount int64 // Number of cache hits (if tracked)
}
ResolverMetrics tracks metrics for a specific resolver
type Tracker ¶
type Tracker struct {
// Packet processing metrics
TotalPackets int64
TotalBytes int64
PacketDecodingNs int64 // Total time spent decoding packets
PacketCount int64 // Count of packets decoded
// TCP reassembly metrics
ReassemblyNs int64 // Total time spent in TCP reassembly
ReassemblyCount int64 // Count of packets reassembled
// DPI metrics
DPICallsNs int64 // Total time in nanoseconds
DPICount int64 // Number of DPI calls
// Timing
StartTime time.Time
EndTime time.Time
// contains filtered or unexported fields
}
Tracker tracks performance metrics for netcap operations
func (*Tracker) RecordAbstractDecoder ¶
RecordAbstractDecoder records metrics for an abstract decoder
func (*Tracker) RecordCustomDecoder ¶
RecordCustomDecoder records metrics for a custom decoder
func (*Tracker) RecordDiskSync ¶
RecordDiskSync records a disk sync operation
func (*Tracker) RecordDiskWrite ¶
RecordDiskWrite records a disk write operation
func (*Tracker) RecordGoPacketDecoder ¶
RecordGoPacketDecoder records metrics for a GoPacket decoder
func (*Tracker) RecordPacketDecoding ¶
RecordPacketDecoding records time spent decoding a packet
func (*Tracker) RecordReassembly ¶
RecordReassembly records time spent in TCP reassembly
func (*Tracker) RecordResolver ¶
RecordResolver records metrics for a resolver lookup
func (*Tracker) RecordStreamDecoder ¶
RecordStreamDecoder records metrics for a stream decoder
func (*Tracker) SetTotalPacketsAndBytes ¶
SetTotalPacketsAndBytes sets the total packets and bytes processed
func (*Tracker) UpdateDecoderRecords ¶
UpdateDecoderRecords updates the record count and bytes for a decoder
func (*Tracker) WriteReport ¶
WriteReport writes a performance report to the specified file