Skip to content

Commit c3d5d82

Browse files
committed
puffin_viewer: Add ability to save and load recordings
1 parent ef4384d commit c3d5d82

File tree

6 files changed

+397
-12
lines changed

6 files changed

+397
-12
lines changed

.github/workflows/ci.yml

+2
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ jobs:
2424
run: |
2525
sudo apt-get update
2626
sudo apt-get -yq --no-install-suggests --no-install-recommends install libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libasound2-dev libxkbcommon-dev # egui_glium dependencies
27+
sudo apt-get install libgtk-3-dev # rfd dependencies
2728
2829
# make sure all code has been formatted with rustfmt
2930
- run: rustup component add rustfmt
@@ -66,6 +67,7 @@ jobs:
6667
run: |
6768
sudo apt-get update
6869
sudo apt-get -yq --no-install-suggests --no-install-recommends install libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libasound2-dev libxkbcommon-dev # egui_glium dependencies
70+
sudo apt-get install libgtk-3-dev # rfd dependencies
6971
- name: cargo test build
7072
uses: actions-rs/cargo@v1
7173
with:

Cargo.lock

+191
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

puffin_egui/src/lib.rs

+8
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,14 @@ fn latest_frames() -> Frames {
321321
}
322322

323323
impl ProfilerUi {
324+
pub fn reset(&mut self) {
325+
let options = self.options;
326+
*self = Self {
327+
options,
328+
..Default::default()
329+
};
330+
}
331+
324332
/// Show an [`egui::Window`] with the profiler contents.
325333
///
326334
/// If you want to control the window yourself, use [`Self::ui`] instead.

puffin_viewer/CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
All notable changes to `puffin_viewer` will be documented in this file.
44

55

6+
## Unreleased
7+
* Load and save recordings as `.puffin` files.
8+
9+
610
## 0.4.0
711
* Add support for compressed TCP stream (up to 75% bandwidth reduction).
812

puffin_viewer/Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,5 @@ puffin_http = { version = "0.4.0", path = "../puffin_http" }
2020
argh = "0.1"
2121
eframe = { version = "0.14", features = ["persistence"] }
2222
log = "0.4"
23+
rfd = "0.4.3"
2324
simple_logger = "1.11"

0 commit comments

Comments
 (0)