Skip to content

Conversation

@zoza1982
Copy link

Add hierarchical process tree view feature

Process Tree View

The --tree-view flag enables hierarchical process visualization, showing parent-child relationships between processes. This is particularly useful for understanding which services or daemons are responsible for network activity, and for visualizing complex applications with multiple child processes. When enabled:

  • Processes are displayed in a tree structure with indentation showing the hierarchy
  • Bandwidth usage is aggregated up the tree (parent processes show their own usage plus their children's)
  • Each process shows its own PID and its relationship to other processes

zoza1982 and others added 7 commits July 29, 2025 08:30
- Add --tree-view flag to display processes in hierarchical tree structure
- Implement ProcessTreeNode for parent-child process relationships
- Enhance ProcessInfo with parent_pid tracking across all platforms
- Add custom error handling module with structured BandwhichError types
- Update table rendering to support tree indentation and hierarchy display
- Aggregate bandwidth usage up the process tree for better insights
- Add comprehensive documentation for tree view functionality
- Update .gitignore to exclude macOS resource fork files

This feature helps visualize which services/daemons are responsible for
network activity and shows complex applications with multiple child processes.
- Add #[allow(dead_code)] to unused BandwhichError variants
- Add #[allow(dead_code)] to unused Result type alias
- Add #[allow(dead_code)] to unused ProcessTreeNode::depth field
- Add #[allow(dead_code)] to unused find_node_mut method

All cargo test warnings are now resolved.
- Fix code formatting issues (whitespace and line formatting)
- Fix clippy lint: uninlined_format_args in error.rs
- Fix clippy lint: vec_init_then_push in os/shared.rs

All tests passing, CI should now pass.
Add explicit lifetime parameter to iter_depth_first return type
Add conditional import for unix platforms to fix from_raw usage
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant