![]() |
SmartSpectra C++ SDK
Measure human vitals from video with SmartSpectra C++ SDK.
|
Classes | |
| class | MetricsCollector |
| class | MetricsCollectorConfig |
| class | RespReader |
Functions | |
| bytes | encode_command (*Union[str, bytes] args) |
| Any | normalize (Any value) |
| Iterable[Tuple[str, List[Dict[str, Any]]]] | _extract_measurement_lists (Any node, Optional[List[str]] path=None) |
| bool | _has_time_fields (Dict[str, Any] sample) |
| Optional[float] | _coerce_sample_timestamp (Dict[str, Any] sample) |
| Optional[float] | _coerce_sample_value (Dict[str, Any] sample) |
MetricsCollector for SmartSpectra IPC. This module provides a MetricsCollector class that subscribes to Redis pub/sub channels for core_metrics and edge_metrics, aggregates them in memory (converting from array-of-structs to struct-of-arrays), and saves both: 1. A continuous JSONL file with all metric envelopes 2. A final aggregated JSON summary file on completion The collector maintains metadata including session start/end times and a user-provided session_id.
|
protected |
Extract timestamp from a sample in microseconds.
|
protected |
Extract numeric value from a sample.
|
protected |
Recursively extract measurement arrays from nested payload structure.
|
protected |
Check if a sample dict has timestamp fields.
| bytes smartspectra.ipc.metrics_collector.encode_command | ( | *Union[str, bytes] | args | ) |
Encode Redis command using RESP protocol.
| Any smartspectra.ipc.metrics_collector.normalize | ( | Any | value | ) |
Normalize bytes to strings in Redis responses.