Skip to content

FEATURE: log run durations for solvers and time analyses - #278

Open
CyberSarvesh wants to merge 2 commits into
camUrban:mainfrom
CyberSarvesh:feature/log-run-timers
Open

FEATURE: log run durations for solvers and time analyses#278
CyberSarvesh wants to merge 2 commits into
camUrban:mainfrom
CyberSarvesh:feature/log-run-timers

Conversation

@CyberSarvesh

@CyberSarvesh CyberSarvesh commented Aug 21, 2026

Copy link
Copy Markdown

Description

[FEATURE] Log run durations for solvents and trim analyses

Motivation

Convergence analysis reports per-iteration and total durations via _functions.format_duration in convergence.py, but the other long-running entry points are silent. SteadyHorseshoe/SteadyRing/UnsteadyRing run() and trim.analyze_steady_trim/analyze_unsteady_trim log progress but never wall-clock duration, so users must time calls themselves when comparing parameters or planning studies. This PR adds consistent total-duration logging styled after convergence.py.

Relevant Issues

Closes #244

Changes

  • pterasoftware/steady_horseshoe_vortex_lattice_method.py:12,168: add import time, capture run_start_time = time.time() in SteadyHorseshoeVortexLatticeMethodSolver.run(), log Steady horseshoe vortex lattice method solver completed in <_functions.format_duration> at end of run (after streamlines, before self._ran = True)
  • pterasoftware/steady_ring_vortex_lattice_method.py:13,223: same for SteadyRingVortexLatticeMethodSolver.run()Steady ring vortex lattice method solver completed in
  • pterasoftware/unsteady_ring_vortex_lattice_method.py:15,469,591: same for UnsteadyRingVortexLatticeMethodSolver.run()Unsteady ring vortex lattice method solver completed in; verified aeroelastic_unsteady_ring_vortex_lattice_method.py / free_flight_unsteady_ring_vortex_lattice_method.py / _coupled_unsteady_ring_vortex_lattice_method.py reuse this run (grep def run finds only 3 solvers), so they are covered without extra instrumentation
  • pterasoftware/trim.py:19,27,361,413,844,896: add import time + from . import _functions, capture run_start_time before Beginning trim analysis in both analyze_steady_trim and analyze_unsteady_trim, log Trim analysis completed in <format_duration> on all 3 exits each (local hit, global hit, not found) — total only, no per-iteration as requested

Dependency Updates

None.

Change Magnitude

Minor: Small enhancement adding logging only, no behavior change.

Checklist

  • I am familiar with the current contribution guidelines.
  • PR description links all relevant issues and follows this template.
  • My branch is based on main and is up to date with the upstream main branch.
  • All calculations use S.I. units.
  • Code is formatted with black (line length = 88).
  • Code is well documented with block comments where appropriate.
  • Any external code, algorithms, or equations used have been cited in comments or docstrings.
  • All new modules, classes, functions, and methods have docstrings in reStructuredText format, and are formatted using docformatter (--in-place --black).
  • All new classes, functions, and methods in the pterasoftware package use type hints.
  • If any major functionality was added or significantly changed, I have added or updated tests in the tests package.
  • Code locally passes all tests in the tests package. (tests.unit.test_steady_horseshoe: 4 OK, tests.unit.test_unsteady_ring_vortex_lattice_method: 20 OK, tests.integration.test_steady_trim: 1 OK; example_solver.log verified Steady ... completed in)
  • This PR passes the ReadTheDocs build check (this runs automatically with the other workflows).
  • This PR passes the ascii-only, pre-commit-hooks, and zizmor GitHub actions. (mixed-line-ending fixed to LF in trim.py)
  • This PR passes the lint job of the CI GitHub action.
  • This PR passes the test jobs of the CI GitHub action.

Proof Of Work

image

Screenshot of the log after running the examples(SteadyHorseshoeVortexLatticeMethodSolver) with the changes. Same pattern applies to the other solvers/trim, so no extra screenshots added.

@CyberSarvesh
CyberSarvesh requested a review from camUrban as a code owner August 21, 2026 14:57
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.

[FEATURE] Log run durations for the solvers and trim analyses

1 participant