Refactor log message formatting for timing information consistency

- Updated log messages across `ApiContext`, `ServeSession`, `Reconciler`, and `App` to use consistent formatting for timing information, replacing placeholder syntax with `string.format` for improved clarity.
- Enhanced trace logs to provide more precise execution time measurements during various operations, including connection, reading, writing, and patch application processes.

These changes aim to standardize logging practices and improve the readability of timing information in the application.
This commit is contained in:
Joe 2026-03-01 14:20:09 -06:00
parent 7b9d44953b
commit 491506fafd
6 changed files with 92 additions and 46 deletions

View file

@ -1006,7 +1006,10 @@ function App:startSession()
Log.trace("[TIMING] PatchTree.build() starting")
local patchTree =
PatchTree.build(patch, instanceMap, { "Property", "Current", "Incoming" }, serverInfo.gitMetadata)
Log.trace("[TIMING] PatchTree.build() completed ({:.1} ms)", (os.clock() - patchTreeClock) * 1000)
Log.trace(
"[TIMING] PatchTree.build() completed ({} ms)",
string.format("%.1f", (os.clock() - patchTreeClock) * 1000)
)
self:setState({
appStatus = AppStatus.Confirming,
patchTree = patchTree,