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

feat: add summary module for aggregating runtime information and internal metrics #365

Open
wants to merge 20 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 19 commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
3be2def
feat: add summary module for aggregating runtime information and inte…
simonsan Nov 21, 2024
5908230
feat: enhance Summary struct to use EcoString
simonsan Nov 21, 2024
9b6dcb7
refactor: remove unnecessary Deserialize derive from CondensedIssue a…
simonsan Nov 21, 2024
9611df5
feat: update Metrics type to use MetricValue enum and modify add_metr…
simonsan Nov 21, 2024
2265256
refactor: simplify Metrics type and update add_issue and add_metric m…
simonsan Nov 21, 2024
a9e89dc
Merge branch 'main' into feat/summary
simonsan Nov 24, 2024
8bbace6
feat: add IssueCategory enum and logging for issues in Summary
simonsan Nov 24, 2024
1f40182
feat: refactor issue handling to categorize by IssueCategory and impr…
simonsan Nov 25, 2024
efb345e
feat: add merge method to Summary and corresponding unit test
simonsan Nov 25, 2024
bbafe09
feat: add TODO comments for refactoring merge method in Summary
simonsan Nov 25, 2024
a437de4
feat: add methods to log errors, warnings, and info in Summary
simonsan Nov 25, 2024
8e13aa9
feat: add method to enable logging in Summary
simonsan Nov 25, 2024
f169967
feat: enhance logging functionality and update root cause handling in…
simonsan Nov 25, 2024
6d61317
feat: update merge method to use Self type and improve handling of op…
simonsan Nov 25, 2024
a27dc6e
feat: add methods to convert Summary into boxed and arc mutex types
simonsan Nov 25, 2024
ddf7828
feat: rename is_error method to contains_error and improve error chec…
simonsan Nov 25, 2024
4b3d073
feat: add method to retrieve Summary from Arc<Mutex> with error handling
simonsan Nov 25, 2024
08a66fb
feat: update retrieve_from_arc_mutex method to use Self type
simonsan Nov 25, 2024
f30bb6e
feat: add assertions to tests for contains_error method in Summary
simonsan Nov 25, 2024
68b40c9
Merge branch 'main' into feat/summary
simonsan Jan 12, 2025
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
3 changes: 3 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion crates/core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ runtime-format = "0.1.3"
bytes = { workspace = true }
bytesize = "1.3.0"
chrono = { version = "0.4.38", default-features = false, features = ["clock", "serde"] }
ecow = "0.2.3"
ecow = { version = "0.2.3", features = ["serde"] }
enum-map = { workspace = true }
enum-map-derive = "0.17.0"
enumset = { version = "1.1.5", features = ["serde"] }
Expand Down
2 changes: 2 additions & 0 deletions crates/core/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@
//! All types that we want to attach to an error should implement `Display` and `Debug` to provide a good error message and a nice way
//! to display the error.

pub(crate) mod summary;

use derive_more::derive::Display;
use ecow::{EcoString, EcoVec};
use std::{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
source: crates/core/src/error/summary.rs
expression: display_output
snapshot_kind: text
---
Context: Check

Issues Encountered:
Warning
Scope: Internal
Pack not found - Occurrences: 1 (Root Cause: Inconsistent state on disk)
Error
Scope: UserInput
Invalid input - Occurrences: 2 (Root Cause: Missing field)
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
source: crates/core/src/error/summary.rs
expression: display_output
---
Context: Check

Metrics:
execution_time: 5s
Loading