diff options
author | Emiliano Ciavatta | 2020-04-21 17:26:23 +0000 |
---|---|---|
committer | Emiliano Ciavatta | 2020-04-21 17:26:23 +0000 |
commit | f8dd01e9cd59ff7c0920eab3dd65c02a15de059e (patch) | |
tree | b10f881d6a9f889911c7661e44ff55881b361665 /pcap_importer.go | |
parent | 26c992c0b529ad52910ee9ed8f8b13dc9f3b9904 (diff) |
Add application_router tests; change connection_stream key hash method
Diffstat (limited to 'pcap_importer.go')
-rw-r--r-- | pcap_importer.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/pcap_importer.go b/pcap_importer.go index bb09867..24ce2cf 100644 --- a/pcap_importer.go +++ b/pcap_importer.go @@ -29,6 +29,8 @@ type PcapImporter struct { type ImportingSession struct { ID string `json:"id" bson:"_id"` + StartedAt time.Time `json:"started_at" bson:"started_at"` + Size int64 `json:"size" bson:"size"` CompletedAt time.Time `json:"completed_at" bson:"completed_at,omitempty"` ProcessedPackets int `json:"processed_packets" bson:"processed_packets"` InvalidPackets int `json:"invalid_packets" bson:"invalid_packets"` @@ -75,6 +77,8 @@ func (pi *PcapImporter) ImportPcap(fileName string) (string, error) { ctx, cancelFunc := context.WithCancel(context.Background()) session := ImportingSession{ ID: hash, + StartedAt: time.Now(), + Size: FileSize(fileName), PacketsPerService: make(map[uint16]flowCount), cancelFunc: cancelFunc, completed: make(chan string), |