Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
b139712
feat(agent): support multiple flow log senders
Jul 24, 2025
6007d11
Merge pull request #1 from svc-design/codex/analyze-deepoflow-agent-n…
Jul 24, 2025
35a6368
Merge branch 'main' into codex/analyze-deepoflow-agent-net-flow-log
Jul 24, 2025
8a9738b
Merge branch 'main' into codex/analyze-deepoflow-agent-net-flow-log
Jul 24, 2025
8e9ae27
Merge branch 'main' into codex/analyze-deepoflow-agent-net-flow-log
Jul 25, 2025
1dd0983
Merge branch 'deepflowio:main' into main
Jul 25, 2025
95f016f
feat(public): add MPMC queue implementation
Jul 25, 2025
88aa9b0
Merge pull request #2 from svc-design/codex/optimize-flow-log-queue-f…
Jul 25, 2025
2cfe200
Merge branch 'main' into codex/analyze-deepoflow-agent-net-flow-log
Jul 25, 2025
fc62aa3
feat(agent): auto tune sender threads and queues
Jul 28, 2025
5246191
feat(agent): clamp auto-tuned queues
Jul 28, 2025
b11fd8d
chore: use default GitHub runners
Jul 28, 2025
4907acf
Merge pull request #4 from svc-design/codex/locate-workflows-in-.gith…
Jul 28, 2025
1ec20b4
Fix AtomicUsize import
Jul 28, 2025
6f9a32d
Merge pull request #5 from svc-design/codex/fix-unresolved-import-for…
Jul 28, 2025
8271dfe
Fix AtomicUsize import
Jul 28, 2025
c32ccdb
Merge pull request #6 from svc-design/codex/fix-compilation-error-in-…
Jul 28, 2025
3950405
ci: switch agent arm64 job to arm runner
Jul 28, 2025
dd22406
Merge pull request #7 from svc-design/codex/replace-runner-with-arm-v…
Jul 28, 2025
e3b011b
fix clone error
Jul 28, 2025
8f4705a
Merge pull request #8 from svc-design/codex/fix-compilation-errors-in…
Jul 28, 2025
8b691c3
Fix rustfmt issues in agent
Jul 28, 2025
bdba597
Merge pull request #9 from svc-design/codex/fix-process-exit-code-1-e…
Jul 28, 2025
8671361
feat(queue): add dynamic queue with auto expansion
Jul 31, 2025
e76ba59
Merge pull request #10 from svc-design/codex/optimize-queue-implement…
Jul 31, 2025
4e50192
Merge branch 'main' into codex/analyze-deepoflow-agent-net-flow-log
Aug 1, 2025
a20a80c
Merge pull request #3 from svc-design/codex/analyze-automatic-adjustm…
Aug 25, 2025
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/agent-build-rust-env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ name: build agent env
jobs:
build_agent_env:
name: build agent env
runs-on: "cirun-aws-amd64-32c--${{ github.run_id }}"
runs-on: "ubuntu-latest"
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down Expand Up @@ -58,7 +58,7 @@ jobs:

build_agent_env_arm64:
name: build agent env arm64
runs-on: "cirun-aws-arm64-32c--${{ github.run_id }}"
runs-on: "ubuntu-latest"
steps:

- name: Checkout
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/agent-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ env:
jobs:
build_agent:
name: build agent
runs-on: "cirun-aws-amd64-32c--${{ github.run_id }}"
runs-on: "ubuntu-latest"
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down Expand Up @@ -183,7 +183,7 @@ jobs:

build_agent_arm64:
name: build agent arm64
runs-on: "cirun-aws-arm64-32c--${{ github.run_id }}"
runs-on: "ubuntu-latest"
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down Expand Up @@ -468,7 +468,7 @@ jobs:

build_agent_static_link:
name: build agent static link
runs-on: "cirun-aws-amd64-32c--${{ github.run_id }}"
runs-on: "ubuntu-latest"
if: "startsWith(github.ref, 'refs/tags/')"
steps:
- name: Checkout
Expand Down Expand Up @@ -576,7 +576,7 @@ jobs:

build_agent_arm64_static_link:
name: build agent arm64 static link
runs-on: "cirun-aws-arm64-32c--${{ github.run_id }}"
runs-on: "ubuntu-latest"
if: "startsWith(github.ref, 'refs/tags/')"
steps:
- name: Checkout
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/agent-verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ name: verify agent
jobs:
verify_agent:
name: verify agent
runs-on: "cirun-aws-amd64-32c--${{ github.run_id }}"
runs-on: "ubuntu-latest"
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down Expand Up @@ -49,7 +49,7 @@ jobs:

verify_agent_arm64:
name: verify agent arm64
runs-on: "cirun-aws-arm64-32c--${{ github.run_id }}"
runs-on: "ubuntu-22.04-arm"
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/server-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ env:
jobs:
build_server:
name: build server
runs-on: "cirun-aws-amd64-32c--${{ github.run_id }}"
runs-on: "ubuntu-latest"
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/server-verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
jobs:
verify_server:
name: verify server
runs-on: "cirun-aws-amd64-32c--${{ github.run_id }}"
runs-on: "ubuntu-latest"
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down
12 changes: 12 additions & 0 deletions agent/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions agent/crates/public/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ serde_yaml = "0.8"
socket2 = "0.4"
thiserror = "1.0"
tonic.workspace = true
crossbeam-channel = "0.5"
crossbeam-queue = "0.3"

[target.'cfg(any(target_os = "linux", target_os = "android"))'.dependencies]
k8s-openapi.workspace = true
Expand Down
38 changes: 37 additions & 1 deletion agent/crates/public/src/queue/debug.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
use std::{
fmt::Debug,
sync::{
atomic::{AtomicBool, Ordering},
atomic::{AtomicBool, AtomicUsize, Ordering},
Arc,
},
};
Expand Down Expand Up @@ -89,3 +89,39 @@ pub fn bounded_with_debug<T>(

(sender, receiver, handle)
}

#[derive(Clone)]
pub struct MultiDebugSender<T> {
senders: Arc<Vec<DebugSender<T>>>,
index: Arc<AtomicUsize>,
}

impl<T> MultiDebugSender<T> {
pub fn new(senders: Vec<DebugSender<T>>) -> Self {
Self {
senders: Arc::new(senders),
index: Arc::new(AtomicUsize::new(0)),
}
}

fn choose(&self) -> &DebugSender<T> {
let i = self
.index
.fetch_add(1, Ordering::Relaxed)
% self.senders.len();
&self.senders[i]
}
}

impl<T: Debug> MultiDebugSender<T> {
pub fn send(&self, msg: T) -> Result<(), Error<T>> {
self.choose().send(msg)
}

pub fn send_all(&self, msgs: &mut Vec<T>) -> Result<(), Error<T>> {
for msg in msgs.drain(..) {
self.send(msg)?;
}
Ok(())
}
}
Loading