Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add metrics #607

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft

Add metrics #607

wants to merge 5 commits into from

Commits on Apr 1, 2024

  1. Add metrics module

    Has a single trait and type to support metric collection and extraction
    for types in the crate.
    
    For now I've put it behind a metrics feature as it does require
    additional CPU cycles to collect, even if it's not used.
    Thomasdezeeuw committed Apr 1, 2024
    Configuration menu
    Copy the full SHA
    003c010 View commit details
    Browse the repository at this point in the history
  2. Add TcpStream::new and make fd field private

    And use it everywhere.
    Thomasdezeeuw committed Apr 1, 2024
    Configuration menu
    Copy the full SHA
    3b3441a View commit details
    Browse the repository at this point in the history
  3. Add metrics to TcpListener

    It collects only one metric: number of accepted connections.
    Thomasdezeeuw committed Apr 1, 2024
    Configuration menu
    Copy the full SHA
    2d9a002 View commit details
    Browse the repository at this point in the history
  4. Log metrics for TCP server on USR2 signal

    When a USR2 signal is received, same signal the runtime uses, it will
    log the metrics that a TcpListener collects, namely the number of
    accepted connections.
    Thomasdezeeuw committed Apr 1, 2024
    Configuration menu
    Copy the full SHA
    d5ce11e View commit details
    Browse the repository at this point in the history
  5. [WIP] Add metrics to TcpStream

    Need to actually start collecting them.
    Thomasdezeeuw committed Apr 1, 2024
    Configuration menu
    Copy the full SHA
    6e93e0d View commit details
    Browse the repository at this point in the history