remove Category from the type system
Category was a manually-assigned label with no remaining functional purpose (decay was the only behavior it drove, and that's gone). Remove the enum, its methods, category_counts, the --category search filter, and all category display. The field remains in the capnp schema for backwards compatibility but is no longer read or written. Status and health reports now show NodeType breakdown (semantic, episodic, daily, weekly, monthly) instead of categories. Co-Authored-By: ProofOfConcept <poc@bcachefs.org>
This commit is contained in:
parent
ba30f5b3e4
commit
488fd5a0aa
7 changed files with 45 additions and 120 deletions
26
src/graph.rs
26
src/graph.rs
|
|
@ -625,8 +625,18 @@ pub fn health_report(graph: &Graph, store: &Store) -> String {
|
|||
}
|
||||
}
|
||||
|
||||
// Category breakdown
|
||||
let cats = store.category_counts();
|
||||
// NodeType breakdown
|
||||
let mut type_counts: std::collections::HashMap<&str, usize> = std::collections::HashMap::new();
|
||||
for node in store.nodes.values() {
|
||||
let label = match node.node_type {
|
||||
crate::store::NodeType::EpisodicSession => "episodic",
|
||||
crate::store::NodeType::EpisodicDaily => "daily",
|
||||
crate::store::NodeType::EpisodicWeekly => "weekly",
|
||||
crate::store::NodeType::EpisodicMonthly => "monthly",
|
||||
crate::store::NodeType::Semantic => "semantic",
|
||||
};
|
||||
*type_counts.entry(label).or_default() += 1;
|
||||
}
|
||||
|
||||
// Load history for deltas
|
||||
let history = load_metrics_history();
|
||||
|
|
@ -665,16 +675,16 @@ Power-law α: {alpha:.2}{alpha_d} (2=hub-dominated, 3=healthy, >3=egalitarian)
|
|||
Degree Gini: {gini:.3}{gini_d} (0=equal, 1=one-hub)
|
||||
|
||||
Community sizes (top 5): {top5}
|
||||
Categories: core={core} tech={tech} gen={gen} obs={obs} task={task}",
|
||||
Types: semantic={semantic} episodic={episodic} daily={daily} weekly={weekly} monthly={monthly}",
|
||||
top5 = sizes.iter().take(5)
|
||||
.map(|s| s.to_string())
|
||||
.collect::<Vec<_>>()
|
||||
.join(", "),
|
||||
core = cats.get("core").unwrap_or(&0),
|
||||
tech = cats.get("tech").unwrap_or(&0),
|
||||
gen = cats.get("gen").unwrap_or(&0),
|
||||
obs = cats.get("obs").unwrap_or(&0),
|
||||
task = cats.get("task").unwrap_or(&0),
|
||||
semantic = type_counts.get("semantic").unwrap_or(&0),
|
||||
episodic = type_counts.get("episodic").unwrap_or(&0),
|
||||
daily = type_counts.get("daily").unwrap_or(&0),
|
||||
weekly = type_counts.get("weekly").unwrap_or(&0),
|
||||
monthly = type_counts.get("monthly").unwrap_or(&0),
|
||||
);
|
||||
|
||||
// Orphan edges
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue