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

Prepare tracy-client 0.17.5 release #126

Merged
merged 3 commits into from
Dec 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
strategy:
fail-fast: false
matrix:
rust_toolchain: [nightly, stable, 1.74.0]
rust_toolchain: [nightly, stable, 1.80.0]
os: [ubuntu-latest, windows-latest, macOS-latest]
flags: [
"",
Expand Down
2 changes: 1 addition & 1 deletion tracy-client/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "tracy-client"
version = "0.17.4" # AUTO-BUMP
version = "0.17.5" # AUTO-BUMP
authors = ["Simonas Kazlauskas <[email protected]>"]
license.workspace = true
edition.workspace = true
Expand Down
20 changes: 20 additions & 0 deletions tracy-client/src/plot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,14 @@ pub enum PlotLineStyle {
}

/// Configuration for how a plot appears in the Tracy profiling UI.
///
/// # Examples
///
/// ```
/// # use tracy_client::PlotConfiguration;
/// // Create a red plot line.
/// let configuration = PlotConfiguration::default().fill(false).color(Some(0xFF0000));
/// ```
#[derive(Clone, PartialEq, Debug)]
pub struct PlotConfiguration {
/// The format of values on the plot.
Expand Down Expand Up @@ -72,6 +80,18 @@ impl PlotConfiguration {
}

/// Sets a custom color of the plot. A value of `None` will cause Tracy to create its own color.
///
/// # Examples
///
/// ```
/// # use tracy_client::PlotConfiguration;
/// // Configure the plot to be red.
/// let red = PlotConfiguration::default().color(Some(0xFF0000));
/// // Configure the plot to be green.
/// let green = PlotConfiguration::default().color(Some(0x00FF00));
/// // Configure the plot to be blue.
/// let blue = PlotConfiguration::default().color(Some(0x0000FF));
/// ```
pub fn color(mut self, color: Option<u32>) -> Self {
self.color = color;
self
Expand Down
3 changes: 3 additions & 0 deletions tracy-client/src/span.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,9 @@ impl Span {
}

/// Emit a color associated with this span.
///
/// The color is specified as RGB. It is most straightforward to specify them as hex literals
/// such as `0xFF0000` for red, `0x00FF00` for green or `0x0000FF` for blue.
pub fn emit_color(&self, color: u32) {
#[cfg(feature = "enable")]
unsafe {
Expand Down
Loading