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

Update for Tracy 0.11.1 (protocol 69) #3

Merged
merged 1 commit into from
Oct 8, 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 Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "rtracy"
version = "0.1.1"
version = "0.1.2"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand All @@ -9,4 +9,4 @@ edition = "2021"
bincode = "2.0.0-rc.3"
lz4 = "1.24.0"
num-traits = "0.2"
num-derive = "0.4.2"
num-derive = "0.4.2"
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# RTracy server
This is server for streaming .utacy files generated by https://github.com/ParadiseSS13/byond-tracy to tracy https://github.com/wolfpld/tracy profiler

Works with Tracy 0.11 (protocol 66)
Works with Tracy 0.11.1 (protocol 69)

This server allow partial streaming of large snapshots to prevent huge memory usage

Expand Down
6 changes: 3 additions & 3 deletions src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -212,9 +212,9 @@ pub fn handle_client(stream: TcpStream, header: &UTracyHeader, locations: &Vec<S
return Err(format!("Invalid client, expected \"TracyPrf\", got {}", std::str::from_utf8(&client_name).unwrap()));
}
let version: u32 = bincode::decode_from_reader(&mut reader, BINCODE_CONFIG).map_err(|e| format!("{}", e))?;
if version != 66 {
if version != 69 {
writer.write(&[HandshakeStatus::HandshakeProtocolMismatch as u8]).map_err(|e| format!("{}", e))?;
return Err(format!("Invalid client version, expected 66, got {}", version));
return Err(format!("Invalid client version, expected 69, got {}", version));
}

writer.write(&[HandshakeStatus::HandshakeWelcome as u8]).map_err(|e| format!("{}", e))?;
Expand Down Expand Up @@ -256,4 +256,4 @@ pub fn handle_client(stream: TcpStream, header: &UTracyHeader, locations: &Vec<S
stream.shutdown(Shutdown::Both).map_err(|e| format!("{}", e))?;

return Ok(());
}
}
3 changes: 2 additions & 1 deletion src/structs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,7 @@ pub enum QueryResponseType {
SingleStringData,
SecondStringData,
MemNamePayload,
ThreadGroupHint,
StringData,
ThreadName,
PlotName,
Expand All @@ -452,4 +453,4 @@ impl Encode for QueryResponseType {
fn encode<E: Encoder>(&self, encoder: &mut E) -> Result<(), EncodeError> {
return self.to_u8().unwrap().encode(encoder);
}
}
}