Skip to content

Commit

Permalink
CI: fix runtime codecov (#356)
Browse files Browse the repository at this point in the history
* fix runtime ci

* update readme

* fix which not found

* fix

* fix
  • Loading branch information
yunwei37 authored Sep 30, 2024
1 parent 9a077d3 commit b00ee36
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 17 deletions.
21 changes: 8 additions & 13 deletions .github/workflows/test-runtime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Install lcov
if: "matrix.container == 'ubuntu-2204'"
run: |
apt-get install -y lcov libzstd-dev libboost-all-dev
apt-get install -y lcov libzstd-dev libboost-all-dev gpg
- name: Install lcov
if: "matrix.container == 'fedora-39'"
run: |
Expand All @@ -51,18 +51,13 @@ jobs:
lcov --capture --directory . --output-file coverage-runtime.info
lcov --remove coverage-runtime.info '/usr/*' --output-file coverage-runtime.info
lcov --list coverage-runtime.info
- name: Generate runtime coverage
run: |
lcov --capture --directory . --output-file coverage-runtime.info --gcov-tool $(which gcov-12)
lcov --remove coverage-runtime.info '/usr/*' --output-file coverage-runtime.info
lcov --list coverage-runtime.info
- name: Upload runtime coverage
uses: actions/upload-artifact@v4
with:
name: coverage-runtime-${{matrix.container}}
include-hidden-files: false
path: |
./coverage-runtime.info
- name: Upload runtime coverage
uses: actions/upload-artifact@v4
with:
name: coverage-runtime-${{matrix.container}}
include-hidden-files: false
path: |
./coverage-runtime.info
- name: build runtime with mpk enable
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@

`bpftime` is a High-Performance userspace eBPF runtime and General Extension Framework designed for userspace. It enables faster Uprobe, USDT, Syscall hooks, XDP, and more event sources by bypassing the kernel and utilizing an optimized compiler like `LLVM`.

> ⚠️ **Note**: `bpftime` is actively under development, and it's not yet recommended for production use now. See our [roadmap](#roadmap) for details. We'd love to hear your feedback and suggestions! Please feel free to open an issue or [Contact us](#contact-and-citations).
📦 [Key Features](#key-features) \
🔨 [Quick Start](#quick-start) \
🔌 [Examples & Use Cases](#examples--use-cases) \
Expand All @@ -19,6 +17,8 @@

bpftime is not `userspace eBPF VM`, it's a userspace runtime framework includes everything to run eBPF in userspace: `loader`, `verifier`, `helpers`, `maps`, `ufunc` and multiple `events` such as Observability, Network, Policy or Access Control. It has multiple VM backend options support. For eBPF VM only, please see [llvmbpf](https://github.com/eunomia-bpf/llvmbpf).

> ⚠️ **Note**: `bpftime` is currently under active development and may contain bugs or unstable API. Please use it with caution. For more details, check our [roadmap](#roadmap). We'd love to hear your feedback and suggestions! Feel free to open an issue or [Contact us](#contact-and-citations).
## Why bpftime? What's the design Goal?

- **Performance Gains**: Achieve better performance by `bypassing the kernel` (e.g., via `Userspace DBI` or `Network Drivers`), with more configurable, optimized and more arch supported JIT/AOT options like `LLVM`, while maintaining compatibility with Linux kernel eBPF.
Expand Down Expand Up @@ -197,6 +197,7 @@ See [eunomia.dev/bpftime/documents/build-and-test](https://eunomia.dev/bpftime/d
`bpftime` is continuously evolving with more features in the pipeline:

- [ ] Keep compatibility with the evolving kernel
- [ ] Refactor for General Extension Framework
- [ ] Trying to refactor, bug fixing for `Production`.
- [ ] More examples and usecases:
- [X] Userspace Network Driver on userspace eBPF
Expand Down
9 changes: 7 additions & 2 deletions benchmark/uprobe/uprobe.bpf.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,20 @@ SEC("uprobe/benchmark/test:__bench_write")
int BPF_UPROBE(__bench_write, char *a, int b, uint64_t c)
{
char buffer[5] = "text";
bpf_probe_write_user(a, buffer, sizeof(buffer));
for (int i = 0; i < 1000; i++) {
bpf_probe_write_user(a, buffer, sizeof(buffer));
}
return b + c;
}

SEC("uprobe/benchmark/test:__bench_read")
int BPF_UPROBE(__bench_read, char *a, int b, uint64_t c)
{
char buffer[5];
int res = bpf_probe_read_user(buffer, sizeof(buffer), a);
int res;
for (int i = 0; i < 1000; i++) {
bpf_probe_read_user(buffer, sizeof(buffer), a);
}
return b + c + res + buffer[1];
}

Expand Down

0 comments on commit b00ee36

Please sign in to comment.