Skip to content

Commit

Permalink
Merge pull request #100 from michaelwoerister/virtual-instead-of-rese…
Browse files Browse the repository at this point in the history
…rved-string-ids

Add API for overriding initial event_id before recording an event and bump version to 0.6.0
  • Loading branch information
wesleywiser authored Dec 12, 2019
2 parents 8d2d4fd + 6925f2d commit 2c1ed0d
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 7 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## [0.6.0] - 2019-12-11
### Added
- `measureme`: Added `SerializationSink::write_bytes_atomic` that optimizes handling of existing buffers ([GH-97])

### Changed
- `summarize`: Fixed a crash when incr_cache_load events would have child events ([GH-93])
- `measureme`: Replaced notion of "reserved" StringIds with simpler "virtual" StringIds ([GH-98])

## [0.5.0] - 2019-12-02
### Added
- `flamegraph`: new tool that uses the `inferno` crate to generate flamegraph svg files ([GH-73])
Expand Down Expand Up @@ -54,3 +62,6 @@
[GH-84]: https://github.com/rust-lang/measureme/pull/84
[GH-87]: https://github.com/rust-lang/measureme/pull/87
[GH-90]: https://github.com/rust-lang/measureme/pull/90
[GH-93]: https://github.com/rust-lang/measureme/pull/93
[GH-97]: https://github.com/rust-lang/measureme/pull/97
[GH-98]: https://github.com/rust-lang/measureme/pull/98
2 changes: 1 addition & 1 deletion analyzeme/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "analyzeme"
version = "0.1.0"
version = "0.6.0"
authors = ["Wesley Wiser <wwiser@gmail.com>", "Michael Woerister <michaelwoerister@posteo>"]
edition = "2018"
license = "MIT OR Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion crox/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "crox"
version = "0.1.0"
version = "0.6.0"
authors = ["Wesley Wiser <wwiser@gmail.com>"]
edition = "2018"

Expand Down
2 changes: 1 addition & 1 deletion flamegraph/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "flamegraph"
version = "0.1.0"
version = "0.6.0"
authors = ["Wesley Wiser <wwiser@gmail.com>", "Michael Woerister <michaelwoerister@posteo>"]
edition = "2018"
license = "MIT OR Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion measureme/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "measureme"
version = "0.5.0"
version = "0.6.0"
authors = ["Wesley Wiser <wwiser@gmail.com>", "Michael Woerister <michaelwoerister@posteo>"]
edition = "2018"
description = "Support crate for rustc's self-profiling feature"
Expand Down
12 changes: 12 additions & 0 deletions measureme/src/profiler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,3 +155,15 @@ impl<'a, S: SerializationSink> Drop for TimingGuard<'a, S> {
self.profiler.record_raw_event(&raw_event);
}
}

impl<'a, S: SerializationSink> TimingGuard<'a, S> {

/// This method set a new `event_id` right before actually recording the
/// event.
#[inline]
pub fn finish_with_override_event_id(mut self, event_id: StringId) {
self.event_id = event_id;
// Let's be explicit about it: Dropping the guard will record the event.
drop(self)
}
}
2 changes: 1 addition & 1 deletion mmview/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "mmview"
version = "0.1.0"
version = "0.6.0"
authors = ["Wesley Wiser <wwiser@gmail.com>", "Michael Woerister <michaelwoerister@posteo>"]
edition = "2018"
license = "MIT OR Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion stack_collapse/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "stack_collapse"
version = "0.1.0"
version = "0.6.0"
authors = ["Wesley Wiser <wwiser@gmail.com>", "Michael Woerister <michaelwoerister@posteo>"]
edition = "2018"
license = "MIT OR Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion summarize/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "summarize"
version = "0.1.0"
version = "0.6.0"
authors = ["Wesley Wiser <wwiser@gmail.com>", "Michael Woerister <michaelwoerister@posteo>"]
edition = "2018"
license = "MIT OR Apache-2.0"
Expand Down

0 comments on commit 2c1ed0d

Please sign in to comment.