Skip to content

Conversation

@whyang9701
Copy link

fix #181

@whyang9701 whyang9701 marked this pull request as ready for review November 7, 2025 15:36
@github-actions
Copy link

github-actions bot commented Nov 7, 2025

Performance Comparison

Total Elapsed Time: 47.69ms → 44.50ms (-6.7%)

Profiling Mode: timing - Execution duration of functions.

+-------------------------------------+----------------------+---------------------------------+---------------------------------+----------------------------------+---------------------------------+----------------------------------+------------------------------+
| Function                            | Calls                | Avg                             | P50                             | P95                              | P99                             | Total                            | % Total                      |
+-------------------------------------+----------------------+---------------------------------+---------------------------------+----------------------------------+---------------------------------+----------------------------------+------------------------------+
| andromeda::main                     | 1 → 1 (+0.0%)        | 47.02ms → 43.84ms (-6.8%)       | 47.02ms → 43.84ms (-6.8%)       | 47.02ms → 43.84ms (-6.8%)        | 47.02ms → 43.84ms (-6.8%)       | 47.02ms → 43.84ms (-6.8%)        | 100.00% → 100.00% (+0.0%)    |
+-------------------------------------+----------------------+---------------------------------+---------------------------------+----------------------------------+---------------------------------+----------------------------------+------------------------------+
| andromeda::run_main                 | 1 → 1 (+0.0%)        | 47.00ms → 43.82ms (-6.8%)       | 47.02ms → 43.84ms (-6.8%)       | 47.02ms → 43.84ms (-6.8%)        | 47.02ms → 43.84ms (-6.8%)       | 47.00ms → 43.82ms (-6.8%)        | 99.95% → 99.96% (+0.0%)      |
+-------------------------------------+----------------------+---------------------------------+---------------------------------+----------------------------------+---------------------------------+----------------------------------+------------------------------+
| run::run                            | 1 → 1 (+0.0%)        | 46.53ms → 43.53ms (-6.4%)       | 46.56ms → 43.55ms (-6.5%)       | 46.56ms → 43.55ms (-6.5%)        | 46.56ms → 43.55ms (-6.5%)       | 46.53ms → 43.53ms (-6.4%)        | 98.96% → 99.30% (+0.3%)      |
+-------------------------------------+----------------------+---------------------------------+---------------------------------+----------------------------------+---------------------------------+----------------------------------+------------------------------+
| run::create_runtime_files           | 1 → 1 (+0.0%)        | 46.53ms → 43.52ms (-6.5%)       | 46.53ms → 43.55ms (-6.4%)       | 46.53ms → 43.55ms (-6.4%)        | 46.53ms → 43.55ms (-6.4%)       | 46.53ms → 43.52ms (-6.5%)        | 98.95% → 99.28% (+0.3%)      |
+-------------------------------------+----------------------+---------------------------------+---------------------------------+----------------------------------+---------------------------------+----------------------------------+------------------------------+
| runtime::run                        | 1 → 1 (+0.0%)        | 26.51ms → 23.51ms (-11.3%)      | 26.53ms → 23.51ms (-11.4%)      | 26.53ms → 23.51ms (-11.4%)       | 26.53ms → 23.51ms (-11.4%)      | 26.51ms → 23.51ms (-11.3%)       | 56.39% → 53.62% (-4.9%)      |
+-------------------------------------+----------------------+---------------------------------+---------------------------------+----------------------------------+---------------------------------+----------------------------------+------------------------------+
| runtime::new                        | 1 → 1 (+0.0%)        | 18.79ms → 18.80ms (+0.0%)       | 18.79ms → 18.81ms (+0.1%)       | 18.79ms → 18.81ms (+0.1%)        | 18.79ms → 18.81ms (+0.1%)       | 18.79ms → 18.80ms (+0.0%)        | 39.95% → 42.87% (+7.3%)      |
+-------------------------------------+----------------------+---------------------------------+---------------------------------+----------------------------------+---------------------------------+----------------------------------+------------------------------+
| extension::load                     | 22 → 22 (+0.0%)      | 820.99µs → 825.11µs (+0.5%)     | 297.22µs → 291.33µs (-2.0%)     | 2.96ms → 2.98ms (+0.7%)          | 5.64ms → 5.69ms (+0.9%)         | 18.06ms → 18.15ms (+0.5%)        | 38.41% → 41.40% (+7.8%)      |
+-------------------------------------+----------------------+---------------------------------+---------------------------------+----------------------------------+---------------------------------+----------------------------------+------------------------------+
| console::internal_print             | 180 → 180 (+0.0%)    | 5.08µs → 3.82µs (-24.7%) 🚀     | 4.94µs → 3.86µs (-21.9%) 🚀     | 5.74µs → 4.95µs (-13.8%)         | 15.47µs → 7.31µs (-52.8%) 🚀    | 914.00µs → 688.05µs (-24.7%) 🚀  | 1.94% → 1.56% (-19.6%)       |
+-------------------------------------+----------------------+---------------------------------+---------------------------------+----------------------------------+---------------------------------+----------------------------------+------------------------------+
| recommended::recommended_extensions | 1 → 1 (+0.0%)        | 60.83µs → 47.02µs (-22.7%) 🚀   | 60.86µs → 47.04µs (-22.7%) 🚀   | 60.86µs → 47.04µs (-22.7%) 🚀    | 60.86µs → 47.04µs (-22.7%) 🚀   | 60.83µs → 47.02µs (-22.7%) 🚀    | 0.12% → 0.10% (-16.7%)       |
+-------------------------------------+----------------------+---------------------------------+---------------------------------+----------------------------------+---------------------------------+----------------------------------+------------------------------+
| console::get_group_indent           | 180 → 180 (+0.0%)    | 240.00ns → 88.00ns (-63.3%) 🚀  | 231.00ns → 50.00ns (-78.4%) 🚀  | 381.00ns → 251.00ns (-34.1%) 🚀  | 451.00ns → 391.00ns (-13.3%)    | 43.23µs → 15.85µs (-63.3%) 🚀    | 0.09% → 0.03% (-66.7%) 🚀    |
+-------------------------------------+----------------------+---------------------------------+---------------------------------+----------------------------------+---------------------------------+----------------------------------+------------------------------+

Generated with hotpath-rs

📊 View Raw JSON Metrics

PR Metrics

{
  "hotpath_profiling_mode": "timing",
  "total_elapsed": 44498043,
  "description": "Execution duration of functions.",
  "caller_name": "andromeda::main",
  "output": {
    "console::internal_print": {
      "calls": 180,
      "avg": 3822,
      "p50": 3857,
      "p95": 4951,
      "p99": 7307,
      "total": 688053,
      "percent_total": 156
    },
    "recommended::recommended_extensions": {
      "calls": 1,
      "avg": 47018,
      "p50": 47039,
      "p95": 47039,
      "p99": 47039,
      "total": 47018,
      "percent_total": 10
    },
    "andromeda::main": {
      "calls": 1,
      "avg": 43837943,
      "p50": 43843583,
      "p95": 43843583,
      "p99": 43843583,
      "total": 43837943,
      "percent_total": 10000
    },
    "run::create_runtime_files": {
      "calls": 1,
      "avg": 43523911,
      "p50": 43548671,
      "p95": 43548671,
      "p99": 43548671,
      "total": 43523911,
      "percent_total": 9928
    },
    "extension::load": {
      "calls": 22,
      "avg": 825112,
      "p50": 291327,
      "p95": 2981887,
      "p99": 5693439,
      "total": 18152465,
      "percent_total": 4140
    },
    "andromeda::run_main": {
      "calls": 1,
      "avg": 43822734,
      "p50": 43843583,
      "p95": 43843583,
      "p99": 43843583,
      "total": 43822734,
      "percent_total": 9996
    },
    "run::run": {
      "calls": 1,
      "avg": 43533129,
      "p50": 43548671,
      "p95": 43548671,
      "p99": 43548671,
      "total": 43533129,
      "percent_total": 9930
    },
    "runtime::new": {
      "calls": 1,
      "avg": 18797707,
      "p50": 18808831,
      "p95": 18808831,
      "p99": 18808831,
      "total": 18797707,
      "percent_total": 4287
    },
    "runtime::run": {
      "calls": 1,
      "avg": 23507993,
      "p50": 23511039,
      "p95": 23511039,
      "p99": 23511039,
      "total": 23507993,
      "percent_total": 5362
    },
    "console::get_group_indent": {
      "calls": 180,
      "avg": 88,
      "p50": 50,
      "p95": 251,
      "p99": 391,
      "total": 15853,
      "percent_total": 3
    }
  }
}

Main Branch Metrics

{
  "hotpath_profiling_mode": "timing",
  "total_elapsed": 47688893,
  "description": "Execution duration of functions.",
  "caller_name": "andromeda::main",
  "output": {
    "console::get_group_indent": {
      "calls": 180,
      "avg": 240,
      "p50": 231,
      "p95": 381,
      "p99": 451,
      "total": 43232,
      "percent_total": 9
    },
    "extension::load": {
      "calls": 22,
      "avg": 820989,
      "p50": 297215,
      "p95": 2961407,
      "p99": 5644287,
      "total": 18061760,
      "percent_total": 3841
    },
    "andromeda::run_main": {
      "calls": 1,
      "avg": 46996670,
      "p50": 47022079,
      "p95": 47022079,
      "p99": 47022079,
      "total": 46996670,
      "percent_total": 9995
    },
    "recommended::recommended_extensions": {
      "calls": 1,
      "avg": 60833,
      "p50": 60863,
      "p95": 60863,
      "p99": 60863,
      "total": 60833,
      "percent_total": 12
    },
    "run::run": {
      "calls": 1,
      "avg": 46534148,
      "p50": 46563327,
      "p95": 46563327,
      "p99": 46563327,
      "total": 46534148,
      "percent_total": 9896
    },
    "runtime::new": {
      "calls": 1,
      "avg": 18788525,
      "p50": 18792447,
      "p95": 18792447,
      "p99": 18792447,
      "total": 18788525,
      "percent_total": 3995
    },
    "andromeda::main": {
      "calls": 1,
      "avg": 47019293,
      "p50": 47022079,
      "p95": 47022079,
      "p99": 47022079,
      "total": 47019293,
      "percent_total": 10000
    },
    "run::create_runtime_files": {
      "calls": 1,
      "avg": 46530210,
      "p50": 46530559,
      "p95": 46530559,
      "p99": 46530559,
      "total": 46530210,
      "percent_total": 9895
    },
    "runtime::run": {
      "calls": 1,
      "avg": 26514897,
      "p50": 26525695,
      "p95": 26525695,
      "p99": 26525695,
      "total": 26514897,
      "percent_total": 5639
    },
    "console::internal_print": {
      "calls": 180,
      "avg": 5077,
      "p50": 4939,
      "p95": 5743,
      "p99": 15471,
      "total": 913999,
      "percent_total": 194
    }
  }
}

@load1n9 load1n9 self-requested a review November 11, 2025 17:29
Copy link
Member

@load1n9 load1n9 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Can fix those CI issues before merging though

@load1n9 load1n9 self-requested a review November 24, 2025 20:47
Copy link
Member

@load1n9 load1n9 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

before merging can you fix these 2 lint issues real quick

error: the Err-variant returned from this function is very large
--> cli/src/run.rs:42:6
|
42 | ) -> Result<()> {
| ^^^^^^^^^^
|
::: cli/src/error.rs:45:5
|
45 | / ParseError {
46 | | diagnostics: Vec,
47 | | file_path: String,
48 | | #[source_code]
49 | | source_code: NamedSource,
50 | | error_spans: Vecmiette::SourceSpan,
51 | | },
| |- the variant ParseError contains at least 144 bytes
...
59 | / RuntimeError {
60 | | message: String,
61 | | file_path: Option,
62 | | line: Option,
... |
67 | | error_span: Option,
68 | | },
| |
- the largest variant contains at least 160 bytes
|
= help: try reducing the size of error::AndromedaError, for example by boxing large elements or replacing it with Box<error::AndromedaError>
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err
= note: -D clippy::result-large-err implied by -D warnings
= help: to override -D warnings add #[allow(clippy::result_large_err)]

error: this loop could be written as a while let loop
--> cli/src/run.rs:55:5
|
55 | / loop {
56 | | // Wait for the first event (blocking)
57 | | match rx.recv() {
58 | | Ok(_event) => {
... |
70 | | }
| |_____^ help: try: while let Ok(_event) = rx.recv() { .. }
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop
= note: -D clippy::while-let-loop implied by -D warnings
= help: to override -D warnings add #[allow(clippy::while_let_loop)]

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.

Implement watch mode for development

2 participants