Skip to main content

dodot_lib/probe/
mod.rs

1//! Probe — introspection for the deployed state.
2//!
3//! Today this module provides two read-only views over `<data_dir>`:
4//!
5//! - [`deployment_map`] — the `pack / handler / source / deployed` map
6//!   that `dodot refresh` (see `docs/proposals/magic.lex`) also
7//!   consumes. Written alongside the shell init script on every `up`
8//!   and `down`.
9//! - [`data_dir_tree`] — a bounded-depth tree walk for `dodot probe
10//!   show-data-dir`.
11//!
12//! See `docs/proposals/profiling.lex` for the full feature spec. A
13//! later phase will add shell-init timing reports under
14//! `<data_dir>/probes/shell-init/`; that state lives in a sibling
15//! submodule when it lands.
16
17pub mod brew;
18pub mod data_dir_tree;
19pub mod deployment_map;
20pub mod last_up;
21pub mod macos_native;
22pub mod shell_init;
23
24pub use data_dir_tree::{collect_data_dir_tree, TreeNode};
25pub use deployment_map::{
26    collect_deployment_map, read_deployment_map, write_deployment_map, DeploymentKind,
27    DeploymentMapEntry,
28};
29pub use last_up::{read_last_up_marker, write_last_up_marker};
30pub use shell_init::{
31    aggregate_profiles, group_profile, parse_profile, read_latest_profile, read_recent_profiles,
32    rotate_profiles, summarize_history, AggregatedTarget, AggregatedView, GroupedProfile,
33    HistoryEntry, Profile, ProfileEntry, ProfileGroup,
34};
35// Internal helper, exposed only within dodot-lib so `commands::probe`
36// can compute staleness without re-implementing filename parsing.
37pub(crate) use shell_init::parse_unix_ts_from_filename;