GithubHelp home page GithubHelp logo

shpalani / bpf_performance Goto Github PK

View Code? Open in Web Editor NEW

This project forked from alan-jowett/bpf_performance_backup

0.0 0.0 0.0 93 KB

A set of platform agnostic to measure the performance of various BPF helper functions

License: MIT License

Shell 13.57% C++ 25.33% C 25.08% PowerShell 12.02% CMake 18.48% TSQL 0.55% Python 4.96%

bpf_performance's Introduction

bpf_performance

CI/CD Coverage Status

A set of platform-agnostic tools to measure the performance of various BPF helper functions.

Overview

Tests are defined as BPF programs, each consisting of a map_state_preparation phase and a test phase. These tests are described in a YAML file.

As an example:

tests:
  - name: Baseline
    description: The Baseline test with an empty eBPF program.
    elf_file: baseline.o
    iteration_count: 10000000
    program_cpu_assignment:
      baseline_program: all

  - name: Hash-table Map Read
    description: Tests reading from a BPF_MAP_TYPE_HASH map.
    elf_file: generic_map.o
    map_state_preparation:
      program: prepare_HASH_state_generic_read
      iteration_count: 1024
    iteration_count: 10000000
    program_cpu_assignment:
      read_HASH: all

  - name: Hash-table Map Update / Read
    description: Tests reading and writing to a BPF_MAP_TYPE_HASH map.
    elf_file: generic_map.o
    map_state_preparation:
      program: prepare_HASH_state_generic_read
      iteration_count: 1024
    iteration_count: 10000000
    program_cpu_assignment:
      update_HASH: [0]
      read_HASH: remaining

Test programs can be pinned to specific CPUs to permit mixed behavior tests, such as concurrent reads and updates to a map.

Building

To build the project:

cmake -B build -S .
cmake --build build

This build process works on both Windows (using eBPF for Windows) and Linux.

For Linux, you need the following packages:

  1. gcc-multilib
  2. libbpf-dev
  3. Clang / llvm

For Windows, you need the following tools:

  1. Nuget
  2. Clang / LLVM

Running the tests

To run the tests on Linux:

cd build/bin
sudo ./bpf_performance_runner tests.yml

On Windows (after installing eBPF for Windows MSI):

cd build\bin\Debug
.\bpf_performance_runner tests.yml

bpf_performance's People

Contributors

alan-jowett avatar shpalani avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.