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 to Tracy protocol 66 #1

Merged
merged 3 commits into from
Jul 26, 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 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.10 (protocol 64)
Works with Tracy 0.11 (protocol 66)

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

Expand Down
4 changes: 2 additions & 2 deletions src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -208,9 +208,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 != 64 {
if version != 66 {
writer.write(&[HandshakeStatus::HandshakeProtocolMismatch as u8]).map_err(|e| format!("{}", e))?;
return Err(format!("Invalid client version, expected 64, got {}", version));
return Err(format!("Invalid client version, expected 66, got {}", version));
}

writer.write(&[HandshakeStatus::HandshakeWelcome as u8]).map_err(|e| format!("{}", e))?;
Expand Down
3 changes: 2 additions & 1 deletion src/structs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -300,10 +300,10 @@ pub enum ServerQueryType {
ServerQueryFrameName,
ServerQueryParameter,
ServerQueryFiberName,
ServerQueryExternalName,
// Items above are high priority. Split order must be preserved. See IsQueryPrio().
ServerQueryDisconnect,
ServerQueryCallstackFrame,
ServerQueryExternalName,
ServerQuerySymbol,
ServerQuerySymbolCode,
ServerQuerySourceCode,
Expand Down Expand Up @@ -394,6 +394,7 @@ pub enum QueryResponseType {
KeepAlive,
ThreadContext,
GpuCalibration,
GpuTimeSync,
Crash,
CrashReport,
ZoneValidation,
Expand Down