Add native self-hosted instance connection to fluxer_desktop
Trimmed monorepo checkout (fluxer_desktop + packages/voice_engine_v2 + tools/ci) with a "Connect to a Different Server" menu item and popout that lets the desktop app switch to any self-hosted Fluxer instance, plus fixes for well-known discovery on single-domain self-hosted deployments and a false-positive ERR_ABORTED on same-origin client redirects during the switch. Defaults to chat.fluxr.chat and uses an isolated userData directory from the official build.
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"measured_at": "85e057a273fd",
|
||||
"host": "darwin-arm64-apple-silicon",
|
||||
"regression_budget_percent": 5.0,
|
||||
"criterion_args": {
|
||||
"warm_up_time_sec": 2,
|
||||
"measurement_time_sec": 5
|
||||
},
|
||||
"benches": {
|
||||
"tick_driver/audio_21_33ms": {
|
||||
"median_ns": 21415000.0,
|
||||
"low_ns": 21395000.0,
|
||||
"high_ns": 21441000.0,
|
||||
"note": "Measures real-time sleep precision against AUDIO_TICK_PERIOD_NS=21333333; baseline reflects clock+scheduler delay on this host, not pure CPU work."
|
||||
},
|
||||
"system_clock_now_ns": {
|
||||
"median_ns": 22.931,
|
||||
"low_ns": 22.763,
|
||||
"high_ns": 23.099,
|
||||
"budget_percent_override": 15.0,
|
||||
"note": "23ns op; clock_gettime variance dominates over 5%. Wider budget reflects the floor of measurement noise."
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
use std::hint::black_box;
|
||||
use std::sync::Arc;
|
||||
|
||||
use criterion::{Criterion, criterion_group, criterion_main};
|
||||
use fluxer_rt_thread::{MonotonicClock, SystemMonotonicClock, TickDriver};
|
||||
|
||||
const AUDIO_TICK_PERIOD_NS: u64 = 21_333_333;
|
||||
|
||||
fn bench_audio_tick(c: &mut Criterion) {
|
||||
let mut group = c.benchmark_group("tick_driver");
|
||||
group.sample_size(20);
|
||||
group.bench_function("audio_21_33ms", |b| {
|
||||
b.iter_custom(|iters| {
|
||||
let clock = Arc::new(SystemMonotonicClock::new());
|
||||
let mut driver = TickDriver::new(clock.clone(), AUDIO_TICK_PERIOD_NS).expect("driver");
|
||||
let _ = driver.wait_until_next_tick().expect("warmup");
|
||||
let start = std::time::Instant::now();
|
||||
for _ in 0..iters {
|
||||
let info = driver.wait_until_next_tick().expect("tick");
|
||||
black_box(info);
|
||||
}
|
||||
start.elapsed()
|
||||
})
|
||||
});
|
||||
group.finish();
|
||||
}
|
||||
|
||||
fn bench_now_ns(c: &mut Criterion) {
|
||||
let clock = SystemMonotonicClock::new();
|
||||
c.bench_function("system_clock_now_ns", |b| {
|
||||
b.iter(|| {
|
||||
let v = MonotonicClock::now_ns(&clock);
|
||||
black_box(v)
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
criterion_group!(benches, bench_audio_tick, bench_now_ns);
|
||||
criterion_main!(benches);
|
||||
Reference in New Issue
Block a user