puffin_http

Crates.iopuffin_http
lib.rspuffin_http
version0.16.1
sourcesrc
created_at2021-06-14 15:00:25.738971
updated_at2024-07-31 16:22:26.987496
descriptionTCP server/client for puffin profiler data
homepagehttps://github.com/EmbarkStudios/puffin
repositoryhttps://github.com/EmbarkStudios/puffin
max_upload_size
id409933
size38,873
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