[PATCH grout] replace clock_t with Grout specific high-res clock
Robin Jarry
rjarry at redhat.com
Sun May 24 22:24:00 CEST 2026
Morten Brørup, May 24, 2026 at 20:39:
> Nanosecond resolution opens possibilities, which are not available
> with microsecond resolution, e.g. shaping and pacing (which
> I understand is WIP); and the type it replaces also uses 64 bit, so
> the resolution improvement does not have a memory cost.
>
> Yes, in the long term, I plan to add less precise types.
Ack.
> I can fix long lines.
> What's the max number of characters per line?
100 columns.
https://github.com/DPDK/grout/blob/v0.15.0/.clang-format#L59
https://github.com/DPDK/grout/blob/v0.15.0/devtools/check-comments#L40
> How to continue a long line on the next line in Grout?
Just write it however you want or keep it in a single line, clang-format
will make it follow the coding style rules :)
> "make lint" spews out warnings about things I didn't touch.
> Do I need to set up some configuration file or pass special parameters for this to work?
>
> My build server is running: Ubuntu 24.04.<redacted> LTS
>
> $ clang-format --version
> Ubuntu clang-format version 18.1.3 (1ubuntu1)
This is way too old. Unfortunately, clang-format has breaking changes on
every release... I think the oldest version we settled on is 21 (22 is
the latest upstream). This means running from Ubuntu/Debian packages is
practically not possible as they are always lagging behind.
The most practical solution is to run it from a container:
podman run --name clang-format -d \
--mount type=bind,src=$PWD,dst=/src --workdir /src \
docker.io/xianpengshen/clang-tools:22 \
bash -c 'apt-get update -q && apt-get install -qy make git && tail -f /dev/null'
podman logs clang-format -f
Once make and git are installed, just use podman exec:
podman exec -it clang-format make lint
podman exec -it clang-format make format
--
Robin
> Offer limited to residents of the contiguous United States.
More information about the grout
mailing list