feat(detmir): add rust-first operations tooling

This commit is contained in:
igor04091968
2026-06-02 17:57:58 +03:00
parent 60670d30a8
commit 19e3682bc8
263 changed files with 51678 additions and 718 deletions
+18
View File
@@ -9,6 +9,8 @@ AW_WORKTIME_HOST="${AW_WORKTIME_HOST:-SHARKON2025}"
AW_WORKTIME_DEFAULT_SAMPLE_SECONDS="${AW_WORKTIME_DEFAULT_SAMPLE_SECONDS:-30}"
AW_WORKTIME_MAX_SAMPLE_SECONDS="${AW_WORKTIME_MAX_SAMPLE_SECONDS:-300}"
OUT_DIR="${OUT_DIR:-reports}"
TARGET_ROOT="${CARGO_TARGET_DIR:-$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)/adk-rust/target}"
RUST_BIN="${RDP_WORKTIME_REPORT_RUST:-}"
usage() {
cat <<EOF
@@ -54,6 +56,22 @@ mkdir -p "$OUT_DIR"
CSV_OUT="${OUT_DIR}/rdp-worktime-${FROM}_${TO}.csv"
JSON_OUT="${OUT_DIR}/rdp-worktime-${FROM}_${TO}.json"
rust_candidates=()
if [[ -n "$RUST_BIN" ]]; then
rust_candidates+=("$RUST_BIN")
fi
rust_candidates+=(
"$TARGET_ROOT/release/rdp-worktime-report"
"$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)/adk-rust/target/release/rdp-worktime-report"
"/usr/local/bin/rdp-worktime-report"
)
for candidate in "${rust_candidates[@]}"; do
if [[ -x "$candidate" ]]; then
exec "$candidate" --from "$FROM" --to "$TO"
fi
done
python3 - "$AW_BASE_URL" "$AW_WORKTIME_HOST" "$AW_WORKTIME_DEFAULT_SAMPLE_SECONDS" "$AW_WORKTIME_MAX_SAMPLE_SECONDS" "$FROM" "$TO" "$CSV_OUT" "$JSON_OUT" <<'PY'
import csv
import json