Skip to content
This repository was archived by the owner on Feb 28, 2024. It is now read-only.

Commit 6e0c70b

Browse files
authored
v0.2.3 - fix metrics feature breakage in v0.2.2 (#50)
1 parent e872025 commit 6e0c70b

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

.circleci/config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ jobs:
5858
- run:
5959
name: cargo test
6060
command: |
61-
sudo -E $HOME/.cargo/bin/cargo test -- --test-threads=1
61+
sudo -E $HOME/.cargo/bin/cargo test --all-features -- --test-threads=1
6262
6363
workflows:
6464
version: 2

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description = "A pure-Rust library for managing eBPF programs."
44
homepage = "https://github.com/redcanaryco/oxidebpf"
55
repository = "https://github.com/redcanaryco/oxidebpf"
66
readme = "README.md"
7-
version = "0.2.2"
7+
version = "0.2.3"
88
license = "BSD-3-Clause"
99
keywords = ["eBPF", "BPF", "linux"]
1010
categories = ["config", "data-structures", "os::linux-apis", "parsing"]

src/maps/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -340,8 +340,8 @@ impl<'a> PerfEventIterator<'a> {
340340
("cpu", map.cpuid.to_string()),
341341
];
342342

343-
let used = (data_head - data_tail) % mmap_size as u64;
344-
let pct_used = used as f64 / (mmap_size as f64 / 100_f64);
343+
let used = (data_head - data_tail) % buffer_size as u64;
344+
let pct_used = used as f64 / (buffer_size as f64 / 100_f64);
345345
metrics::histogram!("perfmap.buffer_unread_pct", pct_used, &labels);
346346
}
347347

0 commit comments

Comments
 (0)