Simon Sundberg 46f5913e6f pping: Truncate aggregation histograms
In many scenarios, the upper range of an aggregation histogram may be
empty (ex. max histogram bins is for 1000ms but highest observed RTT
was 100 ms, leaving 900 trailing empty bins). As trailing empty bins
contain no useful information, simply truncate the histograms to the
highest non-empty bin.

The truncation of histograms has two benefits.

1. It avoids unnecessary processing of empty bins when internally
calculating statics from the histograms. This should not have any
impact on the output.

2. It reduces the size of the histogram in the JSON output
format. This can potentially save a lot of space in instances where
most maximum observed RTT for a prefix during an aggregation interval
is significantly lower than the highest histogram bin. Removing
trailing empty bins (unlike non-trailing ones) does not require
encoding any additional information (like the number of removed bins
or the index of the remaining ones). It can also never make the
histogram take up more space. Thus there are no obvious drawbacks with
"compressing" the histograms in this manner.

In the future it may be relevant to implement other ways to compress
the histograms, which may be more efficient for certain
distributions (ex. very sparse histograms). However as this method of
removing trailing empty bins is both simple and without drawbacks, so
it makes sense to make the default behavior for now.

Signed-off-by: Simon Sundberg <simon.sundberg@kau.se>
2023-07-06 18:01:57 +02:00
2021-06-21 22:51:57 +02:00
2022-03-06 21:54:01 +08:00
2023-03-30 18:09:55 +02:00
2022-11-22 12:58:43 +01:00
2021-11-06 12:33:09 +00:00

Practical BPF examples

This git repository contains a diverse set of practical BPF examples that solve (or demonstrate) a specific use-case using BPF.

It is meant to ease doing rapid prototyping and development, writing C-code BPF programs using libbpf. The goal is to make it easier for developers to get started coding.

Many developers struggle to get a working BPF build environment. The repo enviroment makes it easy to build/compile BPF programs by doing the necessary libbpf setup transparently and detect missing compile dependencies (via the configure script). It is a declared goal to make BPF programming more consumable by detecting and reporting issues (when possible).

S
Description
No description provided
Readme
25 MiB
Languages
C 93.6%
Shell 4.7%
Makefile 1.6%