aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
authorStefan Boberg <[email protected]>2026-04-13 12:09:05 +0200
committerGitHub Enterprise <[email protected]>2026-04-13 12:09:05 +0200
commite0879bed083eab09cfa28043a3b210714d0884b9 (patch)
tree00d5dddc9a046bd0112e1fddcfce430ced14a355 /.github/workflows
parentupdate minio (#947) (diff)
downloadzen-e0879bed083eab09cfa28043a3b210714d0884b9.tar.xz
zen-e0879bed083eab09cfa28043a3b210714d0884b9.zip
Logging and diagnostics improvements (#941)
Core logging and system diagnostics improvements, extracted from the compute branch. ### Logging - **Elapsed timestamps**: Console log now shows elapsed time since launch `[HH:MM:SS.mmm]` instead of full date/time; file logging is unchanged - **Short level names**: 3-letter short level names (`trc`/`dbg`/`inf`/`wrn`/`err`/`crt`) used by both console and file formatters via `ShortToStringView()` - **Consistent field order**: Standardized to `[timestamp] [level] [logger]` across both console and file formatters - **Slim LogMessage/LogPoint**: Remove redundant fields from `LogMessage` (derive level/source from `LogPoint`), flatten `LogPoint` to inline filename/line fields, shrink `LogLevel` to `int8_t` with `static_assert(sizeof(LogPoint) <= 32)` - **Remove default member initializers** and static default `LogPoint` from `LogMessage` — all fields initialized by constructor - **LoggerRef string constructor**: Convenience constructor accepting a string directly - **Fix SendMessage macro collision**: Replace `thread.h` include in `logmsg.h` with a forward declaration of `GetCurrentThreadId()` to avoid pulling in `windows.h` transitively ### System Diagnostics - **Cache static system metrics**: Add `RefreshDynamicSystemMetrics()` that only queries values that change at runtime (available memory, uptime, swap). `SystemMetricsTracker` snapshots full `GetSystemMetrics()` once at construction and reuses cached topology/total memory on each `Query()`, avoiding repeated `GetLogicalProcessorInformationEx` traversal on Windows, `/proc/cpuinfo` parsing on Linux, and `sysctl` topology calls on macOS
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/test_manual.yml38
1 files changed, 21 insertions, 17 deletions
diff --git a/.github/workflows/test_manual.yml b/.github/workflows/test_manual.yml
index 095828656..e25a95143 100644
--- a/.github/workflows/test_manual.yml
+++ b/.github/workflows/test_manual.yml
@@ -64,13 +64,12 @@ jobs:
xmake-version: ${{ env.XMAKE_VERSION }}
- name: Config
- shell: bash
run: |
- SANITIZER_FLAG=""
- if [ "${{ inputs.sanitizer }}" != "none" ]; then
- SANITIZER_FLAG="--${{ inputs.sanitizer }}=y"
- fi
- xmake config -vD -y -m debug --arch=x64 --zensentry=no $SANITIZER_FLAG
+ $SanitizerFlag = ""
+ if ("${{ inputs.sanitizer }}" -ne "none") {
+ $SanitizerFlag = "--${{ inputs.sanitizer }}=y"
+ }
+ xmake config -vD -y -m debug --arch=x64 --zensentry=no $SanitizerFlag
- name: Clean reports
run: if (Test-Path build/reports) { Remove-Item -Recurse -Force build/reports }
@@ -89,18 +88,21 @@ jobs:
}
- name: Build & Test
- shell: bash
run: |
- EXTRA_ARGS=""
- MALLOC_ARG=""
- if [ "${{ inputs.malloc }}" != "default" ]; then
- MALLOC_ARG="--malloc=${{ inputs.malloc }}"
- fi
- USER_ARGS="${{ inputs.extra_args }}"
- if [ -n "$MALLOC_ARG" ] || [ -n "$USER_ARGS" ]; then
- EXTRA_ARGS="-- $MALLOC_ARG $USER_ARGS"
- fi
- xmake test -v -y --run=${{ inputs.test_suite }} --junit $EXTRA_ARGS
+ $ExtraArgs = @()
+ if ("${{ inputs.malloc }}" -ne "default") {
+ $ExtraArgs += "--malloc=${{ inputs.malloc }}"
+ }
+ $UserArgs = "${{ inputs.extra_args }}"
+ if ($UserArgs) {
+ $ExtraArgs += $UserArgs -split ' '
+ }
+ $Cmd = "xmake test -v -y --run=${{ inputs.test_suite }} --junit"
+ if ($ExtraArgs.Count -gt 0) {
+ $Cmd += " -- " + ($ExtraArgs -join ' ')
+ }
+ Write-Host "Running: $Cmd"
+ Invoke-Expression $Cmd
- name: Kill test processes
if: always()
@@ -177,6 +179,7 @@ jobs:
- name: Build & Test
run: |
+ set -x
EXTRA_ARGS=""
MALLOC_ARG=""
if [ "${{ inputs.malloc }}" != "default" ]; then
@@ -257,6 +260,7 @@ jobs:
- name: Build & Test
run: |
+ set -x
EXTRA_ARGS=""
MALLOC_ARG=""
if [ "${{ inputs.malloc }}" != "default" ]; then