interplane.Get Omega
Read in your language

omega-mv

Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance.

Brought by drakestapleton

branch main Branches Tags History

omega-mv / tools / argus / r8_wall.sh

36 lines · 1569 bytes Raw Blame History
1#!/bin/bash
2# SPDX-License-Identifier: Apache-2.0
3# Copyright 2026 Drake Stapleton (AIEN / aien-dev)
4#
5# Licensed under the Apache License, Version 2.0 (the "License");
6# you may not use this file except in compliance with the License.
7# You may obtain a copy of the License at
8#
9# http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an "AS IS" BASIS,
13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
16
17# R8 wall clock, interleaved RX_ARGUS=0 vs RX_ARGUS=2 (ingest consumer).
18# Usage: r8_wall.sh OUT_DIR CPUS ROUNDS > out.jsonl (run under the bench flock)
19set -u
20D=${1:-build}; CPUS=${2:-5-9,15-19}; ROUNDS=${3:-30}
21TIMEFORMAT='%3R %3U %3S'
22for r in $(seq 1 "$ROUNDS"); do
23 for cfg in 0 2; do
24 b=$D/argus$cfg/rx_r8_aegis_test; log=$(mktemp); tf=$(mktemp)
25 if [ "$cfg" = 2 ]; then
26 { time env RX_ARGUS_CONSUMER=ingest taskset -c "$CPUS" "./$b" >"$log" 2>&1; } 2>"$tf"; rc=$?
27 else
28 { time taskset -c "$CPUS" "./$b" >"$log" 2>&1; } 2>"$tf"; rc=$?
29 fi
30 read -r real user sys < "$tf"
31 pass=$(grep -q "failures 0" "$log" && echo true || echo false)
32 printf '{"cfg":"%s","round":%d,"cpus":"%s","load1":%s,"wall_s":%s,"user_s":%s,"sys_s":%s,"rc":%d,"passed":%s}\n' \
33 "$cfg" "$r" "$CPUS" "$(cut -d' ' -f1 /proc/loadavg)" "$real" "$user" "$sys" "$rc" "$pass"
34 rm -f "$log" "$tf"
35 done
36done