-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Top 10 ports #238
base: master
Are you sure you want to change the base?
Top 10 ports #238
Conversation
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #238 +/- ##
==========================================
+ Coverage 40.61% 40.63% +0.02%
==========================================
Files 104 105 +1
Lines 10120 10151 +31
Branches 1492 1495 +3
==========================================
+ Hits 4110 4125 +15
- Misses 5145 5159 +14
- Partials 865 867 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
c723319
to
abd2f62
Compare
@@ -539,6 +546,9 @@ inline uint16_t parse_udp_hdr(const u_char *data_ptr, uint16_t data_len, Packet | |||
pkt->src_port = ntohs(udp->source); | |||
pkt->dst_port = ntohs(udp->dest); | |||
|
|||
stats.top_ports.insert(pkt->src_port); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
V procesních vláknech, které provádí zpracování paketů by neměla být žádná složitější logika zbytečně navíc.
Tato aktualizace top portů má v sobě docela složitou logiku, která by tu být neměla.
Jediné, co by procesní vlákna zde měla dělat je zvýšení čítače pro daný port.
Veškerá složitější logika, která zobrazí top 10 portů atd. by se měla řešit při vyčítání telemetrii.
No description provided.