Pulp
1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
health_read_result.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include <
pulp_tooling/gpu_health/health_result.hpp
>
4
5
#include <cstddef>
6
#include <cstdint>
7
#include <optional>
8
#include <string>
9
#include <string_view>
10
#include <vector>
11
12
namespace
pulp::tooling::gpu_health
{
13
14
inline
constexpr
std::string_view
kHealthReadSchema
=
"pulp.gpu-health-read-result.v1"
;
15
inline
constexpr
std::uint32_t
kHealthReadVersion
= 1;
16
inline
constexpr
std::size_t
kMaximumStartupTrials
= 64;
17
inline
constexpr
std::size_t
kMaximumReferenceHosts
= 8;
18
inline
constexpr
std::size_t
kMaximumMissingTraceCategories
= 16;
19
20
enum class
MeasurementStatus
{
complete
,
incomplete
,
unavailable
,
unverified
};
21
enum class
MeasurementEndpoint
{
native_compositor_presentation
,
headless_capture_complete
};
22
enum class
BudgetStatus
{
ratified
,
unratified
};
23
enum class
CacheState
{
cold
,
warm
};
24
enum class
CacheProvenance
{
25
unknown
,
26
fresh_process
,
27
explicit_cache_reset
,
28
same_process_editor_reopen
,
29
};
30
enum class
VisibleState
{
prepared
,
fallback
,
unknown
};
31
enum class
PipelineContribution
{
material
,
not_material
,
unattributed
,
unverified
};
32
enum class
CausalAttribution
{
complete
,
incomplete
,
unavailable
,
unverified
};
33
enum class
StartupDisposition
{
queue_b4
,
queue_b4_investigation
,
no_change
};
34
35
struct
ReferenceHost
{
36
std::string
host_id
;
37
double
refresh_rate_hz
= 0.0;
38
};
39
43
struct
StartupBudget
{
44
std::string
budget_id
;
45
std::uint32_t
version
= 1;
46
BudgetStatus
status
=
BudgetStatus::unratified
;
47
std::string
clock_origin
{
"editor_open_requested"
};
48
std::string
endpoint
{
"first_nonblank_presented_frame"
};
49
std::string
interaction_hitch_metric
{
"max_present_interval_before_first_nonblank_ms"
};
50
std::uint32_t
trial_count
= 20;
52
std::uint32_t
cold_trial_count
= 10;
53
std::uint32_t
warm_trial_count
= 10;
54
double
percentile
= 95.0;
55
std::optional<double>
threshold_ms
;
56
std::optional<std::string>
threshold_source
;
57
std::vector<ReferenceHost>
reference_hosts
;
58
};
59
60
struct
StartupCorrelation
{
61
std::optional<std::string>
gpu_evidence_id
;
62
std::optional<std::string>
trace_evidence_id
;
63
};
64
65
struct
StartupCapture
{
66
std::uint32_t
event_capacity
= 1;
67
std::uint32_t
event_count
= 0;
68
std::uint64_t
dropped_event_count
= 0;
69
bool
truncated
=
false
;
74
std::vector<std::string>
missing_trace_categories
;
75
};
76
77
struct
StartupIdentity
{
78
std::string
pulp_build_id
;
79
std::optional<std::string>
vellum_revision
;
80
std::optional<std::string>
source_signature_sha256
;
81
std::optional<std::string>
shader_signature_sha256
;
82
std::optional<std::string>
expected_target_signature_sha256
;
83
AdapterClass
adapter_class
=
AdapterClass::unknown
;
84
};
85
86
struct
StartupTrial
{
87
std::uint32_t
sequence
= 0;
88
CacheState
cache_state
=
CacheState::cold
;
90
std::optional<std::string>
lifecycle_id
;
92
CacheProvenance
cache_provenance
=
CacheProvenance::unknown
;
93
std::optional<double>
editor_open_to_first_nonblank_ms
;
94
std::optional<double>
interaction_hitch_ms
;
95
std::optional<double>
shader_compile_ms
;
96
std::optional<double>
upload_ms
;
97
std::optional<double>
hidden_frame_ms
;
98
std::optional<double>
present_ms
;
99
std::optional<std::string>
observed_target_signature_sha256
;
100
std::optional<bool>
content_floor_passed
;
101
VisibleState
visible_state
=
VisibleState::unknown
;
102
Verdict
verdict
=
Verdict::unverified
;
103
std::string
diagnostic_code
{
"gpu.startup.unverified"
};
104
};
105
106
struct
StartupMeasurements
{
107
MeasurementStatus
status
=
MeasurementStatus::unverified
;
108
Verdict
verdict
=
Verdict::unverified
;
112
MeasurementEndpoint
measurement_endpoint
=
MeasurementEndpoint::native_compositor_presentation
;
113
StartupBudget
budget
;
114
StartupCorrelation
correlation
;
115
StartupCapture
capture
;
116
StartupIdentity
identity
;
117
std::vector<StartupTrial>
trials
;
118
std::optional<double>
observed_percentile_ms
;
119
std::optional<double>
interaction_hitch_percentile_ms
;
120
PipelineContribution
pipeline_contribution
=
PipelineContribution::unverified
;
121
CausalAttribution
causal_attribution
=
CausalAttribution::unverified
;
122
std::optional<StartupDisposition>
disposition
;
123
};
124
128
struct
HealthReadResult
{
129
std::string
schema
{
kHealthReadSchema
};
130
std::uint32_t
version
=
kHealthReadVersion
;
131
HealthResult
health
= [] {
132
HealthResult
value;
133
value.schema =
kSchemaV1
;
134
value.version =
kVersionV1
;
135
value.measured_at_utc.clear();
136
return
value;
137
}();
138
StartupMeasurements
startup
;
139
};
140
141
std::string_view
to_string
(
MeasurementStatus
value);
142
std::string_view
to_string
(
MeasurementEndpoint
value);
143
std::string_view
to_string
(
BudgetStatus
value);
144
std::string_view
to_string
(
CacheState
value);
145
std::string_view
to_string
(
CacheProvenance
value);
146
std::string_view
to_string
(
VisibleState
value);
147
std::string_view
to_string
(
PipelineContribution
value);
148
std::string_view
to_string
(
CausalAttribution
value);
149
std::string_view
to_string
(
StartupDisposition
value);
150
155
bool
validate
(
const
HealthReadResult
& result, std::string* error =
nullptr
);
156
157
std::string
to_json
(
const
HealthReadResult
& result,
bool
pretty =
false
);
158
159
}
// namespace pulp::tooling::gpu_health
health_result.hpp
pulp::tooling::gpu_health
Bounded, typed evidence returned by Pulp GPU health diagnostics.
Definition
health_provider.hpp:8
pulp::tooling::gpu_health::validate
bool validate(const HealthReadResult &result, std::string *error=nullptr)
Validates bounds and cross-field claims that JSON Schema cannot express, including percentile derivat...
pulp::tooling::gpu_health::CausalAttribution
CausalAttribution
Definition
health_read_result.hpp:32
pulp::tooling::gpu_health::CausalAttribution::unverified
@ unverified
Definition
health_read_result.hpp:32
pulp::tooling::gpu_health::StartupDisposition
StartupDisposition
Definition
health_read_result.hpp:33
pulp::tooling::gpu_health::StartupDisposition::no_change
@ no_change
Definition
health_read_result.hpp:33
pulp::tooling::gpu_health::StartupDisposition::queue_b4
@ queue_b4
Definition
health_read_result.hpp:33
pulp::tooling::gpu_health::StartupDisposition::queue_b4_investigation
@ queue_b4_investigation
Definition
health_read_result.hpp:33
pulp::tooling::gpu_health::kMaximumMissingTraceCategories
constexpr std::size_t kMaximumMissingTraceCategories
Definition
health_read_result.hpp:18
pulp::tooling::gpu_health::to_string
std::string_view to_string(MeasurementStatus value)
pulp::tooling::gpu_health::MeasurementEndpoint
MeasurementEndpoint
Definition
health_read_result.hpp:21
pulp::tooling::gpu_health::MeasurementEndpoint::headless_capture_complete
@ headless_capture_complete
Definition
health_read_result.hpp:21
pulp::tooling::gpu_health::MeasurementEndpoint::native_compositor_presentation
@ native_compositor_presentation
Definition
health_read_result.hpp:21
pulp::tooling::gpu_health::kMaximumReferenceHosts
constexpr std::size_t kMaximumReferenceHosts
Definition
health_read_result.hpp:17
pulp::tooling::gpu_health::VisibleState
VisibleState
Definition
health_read_result.hpp:30
pulp::tooling::gpu_health::VisibleState::fallback
@ fallback
Definition
health_read_result.hpp:30
pulp::tooling::gpu_health::VisibleState::prepared
@ prepared
Definition
health_read_result.hpp:30
pulp::tooling::gpu_health::VisibleState::unknown
@ unknown
Definition
health_read_result.hpp:30
pulp::tooling::gpu_health::kVersionV1
constexpr std::uint32_t kVersionV1
Definition
health_result.hpp:43
pulp::tooling::gpu_health::MeasurementStatus
MeasurementStatus
Definition
health_read_result.hpp:20
pulp::tooling::gpu_health::MeasurementStatus::incomplete
@ incomplete
Definition
health_read_result.hpp:20
pulp::tooling::gpu_health::MeasurementStatus::unavailable
@ unavailable
Definition
health_read_result.hpp:20
pulp::tooling::gpu_health::MeasurementStatus::unverified
@ unverified
Definition
health_read_result.hpp:20
pulp::tooling::gpu_health::MeasurementStatus::complete
@ complete
Definition
health_read_result.hpp:20
pulp::tooling::gpu_health::kHealthReadVersion
constexpr std::uint32_t kHealthReadVersion
Definition
health_read_result.hpp:15
pulp::tooling::gpu_health::CacheProvenance
CacheProvenance
Definition
health_read_result.hpp:24
pulp::tooling::gpu_health::CacheProvenance::fresh_process
@ fresh_process
Definition
health_read_result.hpp:26
pulp::tooling::gpu_health::CacheProvenance::explicit_cache_reset
@ explicit_cache_reset
Definition
health_read_result.hpp:27
pulp::tooling::gpu_health::CacheProvenance::same_process_editor_reopen
@ same_process_editor_reopen
Definition
health_read_result.hpp:28
pulp::tooling::gpu_health::CacheProvenance::unknown
@ unknown
Definition
health_read_result.hpp:25
pulp::tooling::gpu_health::kHealthReadSchema
constexpr std::string_view kHealthReadSchema
Definition
health_read_result.hpp:14
pulp::tooling::gpu_health::CacheState
CacheState
Definition
health_read_result.hpp:23
pulp::tooling::gpu_health::CacheState::cold
@ cold
Definition
health_read_result.hpp:23
pulp::tooling::gpu_health::CacheState::warm
@ warm
Definition
health_read_result.hpp:23
pulp::tooling::gpu_health::Verdict
Verdict
Four-state outcome that keeps missing or inconclusive evidence out of pass.
Definition
health_result.hpp:125
pulp::tooling::gpu_health::Verdict::unverified
@ unverified
Evidence exists but is insufficient to support a verdict.
Definition
health_result.hpp:129
pulp::tooling::gpu_health::PipelineContribution
PipelineContribution
Definition
health_read_result.hpp:31
pulp::tooling::gpu_health::PipelineContribution::unattributed
@ unattributed
Definition
health_read_result.hpp:31
pulp::tooling::gpu_health::PipelineContribution::not_material
@ not_material
Definition
health_read_result.hpp:31
pulp::tooling::gpu_health::PipelineContribution::unverified
@ unverified
Definition
health_read_result.hpp:31
pulp::tooling::gpu_health::PipelineContribution::material
@ material
Definition
health_read_result.hpp:31
pulp::tooling::gpu_health::BudgetStatus
BudgetStatus
Definition
health_read_result.hpp:22
pulp::tooling::gpu_health::BudgetStatus::ratified
@ ratified
Definition
health_read_result.hpp:22
pulp::tooling::gpu_health::BudgetStatus::unratified
@ unratified
Definition
health_read_result.hpp:22
pulp::tooling::gpu_health::to_json
std::string to_json(const HealthReadResult &result, bool pretty=false)
pulp::tooling::gpu_health::kMaximumStartupTrials
constexpr std::size_t kMaximumStartupTrials
Definition
health_read_result.hpp:16
pulp::tooling::gpu_health::kSchemaV1
constexpr std::string_view kSchemaV1
Historical closed schema identity accepted when parsing stored v1 results.
Definition
health_result.hpp:42
pulp::tooling::gpu_health::AdapterClass
AdapterClass
Adapter class proven by native identity, never inferred from backend alone.
Definition
health_result.hpp:147
pulp::tooling::gpu_health::AdapterClass::unknown
@ unknown
Definition
health_result.hpp:147
pulp::tooling::gpu_health::HealthReadResult
Closed response returned by dev.pulp.gpu/health.read@1.
Definition
health_read_result.hpp:128
pulp::tooling::gpu_health::HealthReadResult::schema
std::string schema
Definition
health_read_result.hpp:129
pulp::tooling::gpu_health::HealthReadResult::health
HealthResult health
Definition
health_read_result.hpp:131
pulp::tooling::gpu_health::HealthReadResult::startup
StartupMeasurements startup
Definition
health_read_result.hpp:138
pulp::tooling::gpu_health::HealthReadResult::version
std::uint32_t version
Definition
health_read_result.hpp:130
pulp::tooling::gpu_health::HealthResult
Closed versioned aggregate returned by the GPU health diagnostic.
Definition
health_result.hpp:206
pulp::tooling::gpu_health::ReferenceHost
Definition
health_read_result.hpp:35
pulp::tooling::gpu_health::ReferenceHost::refresh_rate_hz
double refresh_rate_hz
Definition
health_read_result.hpp:37
pulp::tooling::gpu_health::ReferenceHost::host_id
std::string host_id
Definition
health_read_result.hpp:36
pulp::tooling::gpu_health::StartupBudget
Versioned interpretation contract for startup measurements.
Definition
health_read_result.hpp:43
pulp::tooling::gpu_health::StartupBudget::clock_origin
std::string clock_origin
Definition
health_read_result.hpp:47
pulp::tooling::gpu_health::StartupBudget::budget_id
std::string budget_id
Definition
health_read_result.hpp:44
pulp::tooling::gpu_health::StartupBudget::threshold_ms
std::optional< double > threshold_ms
Definition
health_read_result.hpp:55
pulp::tooling::gpu_health::StartupBudget::reference_hosts
std::vector< ReferenceHost > reference_hosts
Definition
health_read_result.hpp:57
pulp::tooling::gpu_health::StartupBudget::percentile
double percentile
Definition
health_read_result.hpp:54
pulp::tooling::gpu_health::StartupBudget::trial_count
std::uint32_t trial_count
Definition
health_read_result.hpp:50
pulp::tooling::gpu_health::StartupBudget::interaction_hitch_metric
std::string interaction_hitch_metric
Definition
health_read_result.hpp:49
pulp::tooling::gpu_health::StartupBudget::cold_trial_count
std::uint32_t cold_trial_count
Frozen cache-state controls; both are nonzero and sum to trial_count.
Definition
health_read_result.hpp:52
pulp::tooling::gpu_health::StartupBudget::warm_trial_count
std::uint32_t warm_trial_count
Definition
health_read_result.hpp:53
pulp::tooling::gpu_health::StartupBudget::threshold_source
std::optional< std::string > threshold_source
Definition
health_read_result.hpp:56
pulp::tooling::gpu_health::StartupBudget::status
BudgetStatus status
Definition
health_read_result.hpp:46
pulp::tooling::gpu_health::StartupBudget::endpoint
std::string endpoint
Definition
health_read_result.hpp:48
pulp::tooling::gpu_health::StartupBudget::version
std::uint32_t version
Definition
health_read_result.hpp:45
pulp::tooling::gpu_health::StartupCapture
Definition
health_read_result.hpp:65
pulp::tooling::gpu_health::StartupCapture::missing_trace_categories
std::vector< std::string > missing_trace_categories
Instrumentation coverage gaps in an otherwise bounded capture.
Definition
health_read_result.hpp:74
pulp::tooling::gpu_health::StartupCapture::dropped_event_count
std::uint64_t dropped_event_count
Definition
health_read_result.hpp:68
pulp::tooling::gpu_health::StartupCapture::event_count
std::uint32_t event_count
Definition
health_read_result.hpp:67
pulp::tooling::gpu_health::StartupCapture::truncated
bool truncated
Definition
health_read_result.hpp:69
pulp::tooling::gpu_health::StartupCapture::event_capacity
std::uint32_t event_capacity
Definition
health_read_result.hpp:66
pulp::tooling::gpu_health::StartupCorrelation
Definition
health_read_result.hpp:60
pulp::tooling::gpu_health::StartupCorrelation::trace_evidence_id
std::optional< std::string > trace_evidence_id
Definition
health_read_result.hpp:62
pulp::tooling::gpu_health::StartupCorrelation::gpu_evidence_id
std::optional< std::string > gpu_evidence_id
Definition
health_read_result.hpp:61
pulp::tooling::gpu_health::StartupIdentity
Definition
health_read_result.hpp:77
pulp::tooling::gpu_health::StartupIdentity::expected_target_signature_sha256
std::optional< std::string > expected_target_signature_sha256
Definition
health_read_result.hpp:82
pulp::tooling::gpu_health::StartupIdentity::vellum_revision
std::optional< std::string > vellum_revision
Definition
health_read_result.hpp:79
pulp::tooling::gpu_health::StartupIdentity::adapter_class
AdapterClass adapter_class
Definition
health_read_result.hpp:83
pulp::tooling::gpu_health::StartupIdentity::shader_signature_sha256
std::optional< std::string > shader_signature_sha256
Definition
health_read_result.hpp:81
pulp::tooling::gpu_health::StartupIdentity::pulp_build_id
std::string pulp_build_id
Definition
health_read_result.hpp:78
pulp::tooling::gpu_health::StartupIdentity::source_signature_sha256
std::optional< std::string > source_signature_sha256
Definition
health_read_result.hpp:80
pulp::tooling::gpu_health::StartupMeasurements
Definition
health_read_result.hpp:106
pulp::tooling::gpu_health::StartupMeasurements::measurement_endpoint
MeasurementEndpoint measurement_endpoint
Concrete end-to-end observation boundary.
Definition
health_read_result.hpp:112
pulp::tooling::gpu_health::StartupMeasurements::capture
StartupCapture capture
Definition
health_read_result.hpp:115
pulp::tooling::gpu_health::StartupMeasurements::correlation
StartupCorrelation correlation
Definition
health_read_result.hpp:114
pulp::tooling::gpu_health::StartupMeasurements::verdict
Verdict verdict
Definition
health_read_result.hpp:108
pulp::tooling::gpu_health::StartupMeasurements::identity
StartupIdentity identity
Definition
health_read_result.hpp:116
pulp::tooling::gpu_health::StartupMeasurements::status
MeasurementStatus status
Definition
health_read_result.hpp:107
pulp::tooling::gpu_health::StartupMeasurements::disposition
std::optional< StartupDisposition > disposition
Definition
health_read_result.hpp:122
pulp::tooling::gpu_health::StartupMeasurements::budget
StartupBudget budget
Definition
health_read_result.hpp:113
pulp::tooling::gpu_health::StartupMeasurements::trials
std::vector< StartupTrial > trials
Definition
health_read_result.hpp:117
pulp::tooling::gpu_health::StartupMeasurements::interaction_hitch_percentile_ms
std::optional< double > interaction_hitch_percentile_ms
Definition
health_read_result.hpp:119
pulp::tooling::gpu_health::StartupMeasurements::pipeline_contribution
PipelineContribution pipeline_contribution
Definition
health_read_result.hpp:120
pulp::tooling::gpu_health::StartupMeasurements::observed_percentile_ms
std::optional< double > observed_percentile_ms
Definition
health_read_result.hpp:118
pulp::tooling::gpu_health::StartupMeasurements::causal_attribution
CausalAttribution causal_attribution
Definition
health_read_result.hpp:121
pulp::tooling::gpu_health::StartupTrial
Definition
health_read_result.hpp:86
pulp::tooling::gpu_health::StartupTrial::verdict
Verdict verdict
Definition
health_read_result.hpp:102
pulp::tooling::gpu_health::StartupTrial::hidden_frame_ms
std::optional< double > hidden_frame_ms
Definition
health_read_result.hpp:97
pulp::tooling::gpu_health::StartupTrial::observed_target_signature_sha256
std::optional< std::string > observed_target_signature_sha256
Definition
health_read_result.hpp:99
pulp::tooling::gpu_health::StartupTrial::upload_ms
std::optional< double > upload_ms
Definition
health_read_result.hpp:96
pulp::tooling::gpu_health::StartupTrial::diagnostic_code
std::string diagnostic_code
Definition
health_read_result.hpp:103
pulp::tooling::gpu_health::StartupTrial::editor_open_to_first_nonblank_ms
std::optional< double > editor_open_to_first_nonblank_ms
Definition
health_read_result.hpp:93
pulp::tooling::gpu_health::StartupTrial::interaction_hitch_ms
std::optional< double > interaction_hitch_ms
Definition
health_read_result.hpp:94
pulp::tooling::gpu_health::StartupTrial::sequence
std::uint32_t sequence
Definition
health_read_result.hpp:87
pulp::tooling::gpu_health::StartupTrial::content_floor_passed
std::optional< bool > content_floor_passed
Definition
health_read_result.hpp:100
pulp::tooling::gpu_health::StartupTrial::lifecycle_id
std::optional< std::string > lifecycle_id
Unique editor lifecycle identity retained in the durable response.
Definition
health_read_result.hpp:90
pulp::tooling::gpu_health::StartupTrial::visible_state
VisibleState visible_state
Definition
health_read_result.hpp:101
pulp::tooling::gpu_health::StartupTrial::present_ms
std::optional< double > present_ms
Definition
health_read_result.hpp:98
pulp::tooling::gpu_health::StartupTrial::cache_provenance
CacheProvenance cache_provenance
Explicit cache boundary; never inferred from cold/warm labels or timing.
Definition
health_read_result.hpp:92
pulp::tooling::gpu_health::StartupTrial::shader_compile_ms
std::optional< double > shader_compile_ms
Definition
health_read_result.hpp:95
pulp::tooling::gpu_health::StartupTrial::cache_state
CacheState cache_state
Definition
health_read_result.hpp:88
tools
cli
gpu_health
include
pulp_tooling
gpu_health
health_read_result.hpp
Generated by
1.15.0