Skip to content

Internal core for the codspeed instruments

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

CodSpeedHQ/instrument-hooks

Repository files navigation

instrument-hooks

CI Discord

Zig library to control instrumentations via IPC.

Requirements

  • Zig: 0.14
  • Just (optional): To easily run the build, formatter or tests

How to add new integration?

Create a new release of this library:

just release

You can then include build and link to the files in dist/. Use the dist/core.h header to automatically generate bindings, or create them manually.

To test if it worked, call is_instrumented which should return false when running without Codspeed. To run with Codspeed, execute the following:

codspeed run -- <your_cmd>

To make sure your integration is fully working, you have to implement all these hooks:

  • start_benchmark: Call this when the benchmark starts, to start measuring the performance.
  • stop_benchmark: Stop measuring the performance after the benchmark stopped.
  • executed_benchmark: Provide metadata about which benchmark was executed.
  • set_integration: Provide metadata about the integration.

Run tests

zig build test --summary all

or

just test

About

Internal core for the codspeed instruments

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Languages