Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Da1sypetals/SnapViewer
/ functions
Functions
98 in github.com/Da1sypetals/SnapViewer
⨍
Functions
98
◇
Types & classes
20
↓ 6 callers
Method
close
Handle window close event
gui.py:645
↓ 6 callers
Method
scale
(&self)
src/window_transform.rs:50
↓ 5 callers
Function
get_spinner
(message: &str)
src/utils.rs:39
↓ 4 callers
Method
enforce_boundaries
actions
src/window_transform.rs:112
↓ 4 callers
Method
translate
(&mut self, dir: TranslateDir)
src/window_transform.rs:147
↓ 4 callers
Method
translate_step
(&self)
src/window_transform.rs:54
↓ 3 callers
Method
__init__
(self, parent, args, palette: ColorPalette)
gui.py:314
↓ 3 callers
Function
advance
Advance the timeline by `n` steps, tracking summary usage.
convert_snap.py:112
↓ 3 callers
Method
connect
Connect to the renderer's REP socket
gui.py:134
↓ 3 callers
Method
execute
(&self, command: &str)
src/database/sqlite.rs:36
↓ 3 callers
Function
generate_ticks
(low_bytes: i64, high_bytes: i64)
src/ticks.rs:145
↓ 3 callers
Method
screen2world_physical
Convert physical pixel mouse coordinates to logical pixel world coordinates Mouse events from three_d are in physical pixels, but our world is in logi
src/window_transform.rs:96
↓ 2 callers
Function
_replace_scrollbar
Replace the tk.Scrollbar inside a ScrolledText with a ttk.Scrollbar. macOS native rendering ignores color options on tk.Scrollbar, so we swap
gui.py:153
↓ 2 callers
Function
convert_pickle_to_dir
Process a pickle file and write allocations.json + elements.db to output_dir. output_dir must already exist.
convert_snap.py:271
↓ 2 callers
Function
from_allocations
( allocations: impl ExactSizeIterator<Item = &'a AllocationGeometry>, // required for progress bar )
src/render_data.rs:7
↓ 2 callers
Function
from_allocations_with_z
( alloc_zip_colors: impl Iterator<Item = (&'a AllocationGeometry, Srgba)>, z: f64, )
src/render_data.rs:34
↓ 2 callers
Method
is_alive_at
(&self, timestamp: u64)
src/allocation.rs:44
↓ 2 callers
Method
material
(&self)
src/render_loop.rs:79
↓ 2 callers
Function
memory_ticks
(a, b, min_ticks=8)
notes/ticks.py:39
↓ 2 callers
Method
run
Start the GUI event loop
gui.py:660
↓ 2 callers
Function
terminate
Terminate the application
gui.py:665
↓ 2 callers
Method
tick
(&mut self)
src/render_loop.rs:20
↓ 2 callers
Method
update_color
(&mut self)
src/render_loop.rs:63
↓ 2 callers
Method
update_content
Update the message content
gui.py:265
↓ 2 callers
Method
update_output
Update the output display
gui.py:482
↓ 2 callers
Method
update_zoom
(&mut self, new_zoom: f32, screen_pos: (f32, f32))
src/window_transform.rs:119
↓ 2 callers
Method
yworld2memory
y_world: y position (world coords) Allow negative memory
src/geometry.rs:132
↓ 1 callers
Method
camera
(&self, viewport: Viewport)
src/window_transform.rs:66
↓ 1 callers
Function
choose_interval
(a, b, min_ticks)
notes/ticks.py:14
↓ 1 callers
Function
choose_interval
(a: f64, b: f64, min_ticks: usize)
src/ticks.rs:100
↓ 1 callers
Function
cli
Command-line interface to process a snapshot and write allocations.json + elements.db to a directory.
convert_snap.py:293
↓ 1 callers
Function
compute_file_hash
(path: str)
gui.py:37
↓ 1 callers
Method
execute_sql
Send SQL command and receive response
gui.py:139
↓ 1 callers
Method
find_by_pos
return index of allocation FIXME: this is a fucking naive implementation
src/geometry.rs:87
↓ 1 callers
Function
format_callstack
(frames: list)
convert_snap.py:48
↓ 1 callers
Method
generate_memory_ticks
( &self, low_bytes: i64, high_bytes: i64, scale: f32, screen_center_wo
src/ticks.rs:31
↓ 1 callers
Method
generate_text_mesh
y is 0~1, 0 for left-bottom, 1 for left-top. scale: reciprocal of zoom
src/ticks.rs:57
↓ 1 callers
Function
generate_ticks
(a, b, interval)
notes/ticks.py:25
↓ 1 callers
Function
generate_ticks_f64
(a: f64, b: f64, interval: f64)
src/ticks.rs:126
↓ 1 callers
Function
get_intervals
()
notes/ticks.py:10
↓ 1 callers
Function
get_or_create_cache
(pickle_path: str, device_id: int)
gui.py:44
↓ 1 callers
Function
get_trace
Retrieve the trace for a specific device from the snapshot dump. Args: dump (dict): Parsed snapshot data. device_id (int): I
convert_snap.py:195
↓ 1 callers
Function
handle_sql_command
(db_ptr: u64, command: &str)
src/main.rs:359
↓ 1 callers
Function
insert_data
(idx, alloc, elem)
convert_snap.py:246
↓ 1 callers
Function
main
()
gui.py:753
↓ 1 callers
Function
make_db
Create an SQLite database at db_path. Args: allocs (list): List of allocation data elems (list): List of element data
convert_snap.py:227
↓ 1 callers
Method
num_steps
(&self)
src/geometry.rs:14
↓ 1 callers
Function
process_alloc_data
Processes the device trace into a structured format showing allocations over time. Args: device_trace (list): List of memory events.
convert_snap.py:56
↓ 1 callers
Function
read_allocations
Reads from dir.join(allocations.json) and deserialize ## Returns An atomic refcounted pointer to allocation slice. Executed at start
src/load.rs:17
↓ 1 callers
Method
reset
(&mut self, target_color: Srgba)
src/render_loop.rs:57
↓ 1 callers
Method
row_count
(&self)
src/database/sqlite.rs:28
↓ 1 callers
Function
run_gui
Run the GUI application
gui.py:738
↓ 1 callers
Function
run_render_loop
( state: RendererState, mut rl: RenderLoop, cpu_mesh: CpuMesh, )
src/main.rs:140
↓ 1 callers
Method
screen2world
(&self, cursor_pos_px: (f32, f32))
src/window_transform.rs:81
↓ 1 callers
Method
set_zoom_limits
(&mut self, low: f32, high: f32)
src/window_transform.rs:39
↓ 1 callers
Method
setup_ui
Setup the UI components
gui.py:177
↓ 1 callers
Method
setup_ui
Setup the UI components
gui.py:321
↓ 1 callers
Method
setup_ui
Setup the main UI
gui.py:514
↓ 1 callers
Method
show_alloc
(&mut self, context: &Context, idx: usize)
src/render_loop.rs:116
↓ 1 callers
Function
spawn_renderer
Spawn the renderer process
gui.py:681
↓ 1 callers
Method
start_receiver
Start the ZeroMQ receiver thread
gui.py:509
↓ 1 callers
Method
stop
Stop the receiver thread
gui.py:117
↓ 1 callers
Function
trace_to_allocation_data
Convert device trace into allocation timeline and elements. Args: device_trace (list): A list of memory allocation/free events for a
convert_snap.py:32
↓ 1 callers
Method
ybot_world
(&self)
src/window_transform.rs:62
↓ 1 callers
Method
ytop_world
(&self)
src/window_transform.rs:58
↓ 1 callers
Method
zoom_in
(&mut self, screen_pos: (f32, f32))
src/window_transform.rs:131
↓ 1 callers
Method
zoom_out
(&mut self, screen_pos: (f32, f32))
src/window_transform.rs:139
Method
__init__
(self, host, port, app)
gui.py:88
Method
__init__
(self, host, port)
gui.py:128
Method
__init__
(self, parent, palette: ColorPalette)
gui.py:171
Method
__init__
(self, parent, **kwargs)
gui.py:280
Method
__init__
(self, args, sql_client, palette: ColorPalette = CUTE)
gui.py:500
Method
_toggle_repl
(self)
gui.py:633
Method
allocation_info
(&self, db_ptr: u64, idx: usize)
src/render_loop.rs:133
Method
close
Close the connection
gui.py:146
Method
fmt
(&self, f: &mut Formatter<'_>)
src/allocation.rs:16
Function
format_bytes
(bytes: i64)
src/utils.rs:10
Function
format_bytes_precision
Rust has no default parameter value ...
src/utils.rs:25
Function
format_frame
(iframe: tuple[int, dict])
convert_snap.py:49
Function
format_size
(num)
notes/ticks.py:1
Method
from_allocations
Executed at start
src/geometry.rs:37
Method
from_dir
(dir: &Path)
src/database/sqlite.rs:14
Method
initialize
Executed at start
src/render_loop.rs:94
Method
is_alive_in_interval
(&self, start: u64, stop: u64)
src/allocation.rs:40
Method
jbmono
(resolution: (u32, u32), fontsize_px: f32)
src/ticks.rs:16
Function
main
()
src/main.rs:57
Function
memory_usage
()
src/utils.rs:6
Method
new
(resolution: (u32, u32), resolution_ratio: f64)
src/window_transform.rs:22
Method
new
()
src/render_loop.rs:14
Method
on_down_arrow
(self, event)
gui.py:293
Method
on_submit
Handle command submission
gui.py:428
Method
on_up_arrow
(self, event)
gui.py:287
Function
positive_int
(value)
gui.py:758
Method
run
Receive messages and update GUI thread-safely
gui.py:98
Method
start_end_time
(&self)
src/allocation.rs:48
Function
test_ticks
()
src/ticks.rs:161
Method
update_message
Update the message panel content
gui.py:629
Method
xworld2timestamp
x_world: x position (world timestamp) Allow negative time
src/geometry.rs:138