mirror of
https://github.com/ParrotXray/Mantis.git
synced 2026-08-24 19:00:27 +09:00
Remove unused src_ip/dst_ip/timestamp fields from FlowFeatures
These fields were populated but never read — inference always accesses IP addresses directly from FlowData.flow_key. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0138PxtKH73hqxv7h1oaoSdS
This commit is contained in:
parent
77e04807a6
commit
2abc3f73ab
@ -9,10 +9,6 @@ use crate::model::ml_detection::{ClipParams, PacketData};
|
||||
pub struct FlowFeatures {
|
||||
pub features: Vec<f64>,
|
||||
pub feature_num: usize,
|
||||
|
||||
pub src_ip: String,
|
||||
pub dst_ip: String,
|
||||
pub timestamp: u64,
|
||||
}
|
||||
|
||||
impl FlowFeatures {
|
||||
@ -23,13 +19,7 @@ impl FlowFeatures {
|
||||
for name in feature_names {
|
||||
features.push(Self::get_feature_by_name(flow, name.trim()));
|
||||
}
|
||||
Self {
|
||||
features,
|
||||
feature_num,
|
||||
src_ip: flow.flow_key.src_ip.to_string(),
|
||||
dst_ip: flow.flow_key.dst_ip.to_string(),
|
||||
timestamp: flow.start_time_us,
|
||||
}
|
||||
Self { features, feature_num }
|
||||
}
|
||||
|
||||
fn get_feature_by_name(flow: &FlowData, feature_name: &str) -> f64 {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user