puffin_http

Crates.iopuffin_http
lib.rspuffin_http
version0.16.0
sourcesrc
created_at2021-06-14 15:00:25.738971
updated_at2024-01-17 10:23:34.759523
descriptionTCP server/client for puffin profiler data
homepagehttps://github.com/EmbarkStudios/puffin
repositoryhttps://github.com/EmbarkStudios/puffin
max_upload_size
id409933
size27,503
Emil Ernerfeldt (emilk)

documentation

README

puffin_http

Embark Embark Crates.io Docs

A HTTP server/client for communicating puffin profiling events.

You can view them using puffin_viewer.

How to use

Add a puffin_http Server to the profiled application When the server is started, puffin_viewer application can connect to it and display profiling information.

fn main() {
    let server_addr = format!("0.0.0.0:{}", puffin_http::DEFAULT_PORT);
    let _puffin_server = puffin_http::Server::new(&server_addr).unwrap();
    eprintln!("Serving demo profile data on {server_addr}. Run `puffin_viewer` to view it.");
    puffin::set_scopes_on(true);

    // …
}

You can checkout the examples/server.rs for a more complete example.

Commit count: 303

cargo fmt