Bug 1919090: Flatten webgl info. r=tjr

Differential Revision: https://phabricator.services.mozilla.com/D222346
This commit is contained in:
Fatih 2024-09-18 19:41:09 +00:00
Родитель ef1c71016a
Коммит c6c9b281f5
3 изменённых файлов: 325 добавлений и 8 удалений

Просмотреть файл

@ -445,12 +445,12 @@ export class UserCharacteristicsPageService {
v2: [],
extensions: [],
},
shader_precision: {
shaderPrecision: {
FRAGMENT_SHADER: {},
VERTEX_SHADER: {},
},
debug_shaders: {},
debug_params: {},
debugShaders: {},
debugParams: {},
};
const canvas = document.createElement("canvas");
@ -581,7 +581,7 @@ export class UserCharacteristicsPageService {
gl[shaderType],
gl[precisionType]
);
results.shader_precision[shaderType][precisionType] = {
results.shaderPrecision[shaderType][precisionType] = {
rangeMin,
rangeMax,
precision,
@ -592,7 +592,7 @@ export class UserCharacteristicsPageService {
const mozDebugExt = gl.getExtension("MOZ_debug");
const debugExt = gl.getExtension("WEBGL_debug_renderer_info");
results.debug_params = {
results.debugParams = {
versionRaw: mozDebugExt.getParameter(gl.VERSION),
vendorRaw: mozDebugExt.getParameter(gl.VENDOR),
rendererRaw: mozDebugExt.getParameter(gl.RENDERER),
@ -655,7 +655,7 @@ export class UserCharacteristicsPageService {
return hashHex;
}
results.debug_shaders = {
results.debugShaders = {
fs: await sha1(
translationExt.getTranslatedShaderSource(fragmentShader)
),
@ -664,7 +664,35 @@ export class UserCharacteristicsPageService {
};
}
Glean.characteristics.webglinfo.set(JSON.stringify(results));
// General
Glean.characteristics.glVersion.set(results.glVersion);
// Debug Params
Glean.characteristics.glExtensions.set(results.debugParams.extensions);
Glean.characteristics.glExtensionsRaw.set(
results.debugParams.extensionsRaw
);
Glean.characteristics.glRenderer.set(results.debugParams.rendererDebugInfo);
Glean.characteristics.glRendererRaw.set(results.debugParams.rendererRaw);
Glean.characteristics.glVendor.set(results.debugParams.vendorDebugInfo);
Glean.characteristics.glVendorRaw.set(results.debugParams.vendorRaw);
Glean.characteristics.glVersionRaw.set(results.debugParams.versionRaw);
// Debug Shaders
Glean.characteristics.glFragmentShader.set(results.debugShaders.fs);
Glean.characteristics.glVertexShader.set(results.debugShaders.vs);
Glean.characteristics.glMinimalSource.set(results.debugShaders.ms);
// Parameters
Glean.characteristics.glParamsExtensions.set(
JSON.stringify(results.parameters.extensions)
);
Glean.characteristics.glParamsV1.set(JSON.stringify(results.parameters.v1));
Glean.characteristics.glParamsV2.set(JSON.stringify(results.parameters.v2));
// Shader Precision
Glean.characteristics.glPrecisionFragment.set(
JSON.stringify(results.shaderPrecision.FRAGMENT_SHADER)
);
Glean.characteristics.glPrecisionVertex.set(
JSON.stringify(results.shaderPrecision.VERTEX_SHADER)
);
}
async pageLoaded(browsingContext, data) {

Просмотреть файл

@ -1729,6 +1729,295 @@ characteristics:
# is more like 'technical' (per the Data Review), I'm marking highly sensitive.
- highly_sensitive
gl_version:
type: quantity
unit: int
description: >
The version of OpenGL supported by the user's system.
lifetime: application
send_in_pings:
- user-characteristics
notification_emails:
- tom@mozilla.com
bugs:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1919090
data_reviews:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1919090#c5
expires: never
data_sensitivity:
- technical
gl_extensions:
type: text
description: >
The list of OpenGL extensions supported by the user's system.
lifetime: application
send_in_pings:
- user-characteristics
notification_emails:
- tom@mozilla.com
bugs:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1919090
data_reviews:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1919090#c5
expires: never
data_sensitivity:
# Text metrics are _required_ to be web_activity or highly_sensitive, so even though this
# is more like 'technical' (per the Data Review), I'm marking highly sensitive.
- highly_sensitive
gl_extensions_raw:
type: text
description: >
The raw list of OpenGL extensions supported by the user's system.
lifetime: application
send_in_pings:
- user-characteristics
notification_emails:
- tom@mozilla.com
bugs:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1919090
data_reviews:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1919090#c5
expires: never
data_sensitivity:
# Text metrics are _required_ to be web_activity or highly_sensitive, so even though this
# is more like 'technical' (per the Data Review), I'm marking highly sensitive.
- highly_sensitive
gl_renderer:
type: string
description: >
The OpenGL renderer string.
lifetime: application
send_in_pings:
- user-characteristics
notification_emails:
- tom@mozilla.com
bugs:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1919090
data_reviews:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1919090#c5
expires: never
data_sensitivity:
- technical
gl_renderer_raw:
type: string
description: >
The raw OpenGL renderer string.
lifetime: application
send_in_pings:
- user-characteristics
notification_emails:
- tom@mozilla.com
bugs:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1919090
data_reviews:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1919090#c5
expires: never
data_sensitivity:
- technical
gl_vendor:
type: string
description: >
The OpenGL vendor string.
lifetime: application
send_in_pings:
- user-characteristics
notification_emails:
- tom@mozilla.com
bugs:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1919090
data_reviews:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1919090#c5
expires: never
data_sensitivity:
- technical
gl_vendor_raw:
type: string
description: >
The raw OpenGL vendor string.
lifetime: application
send_in_pings:
- user-characteristics
notification_emails:
- tom@mozilla.com
bugs:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1919090
data_reviews:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1919090#c5
expires: never
data_sensitivity:
- technical
gl_version_raw:
type: string
description: >
The raw OpenGL version string.
lifetime: application
send_in_pings:
- user-characteristics
notification_emails:
- tom@mozilla.com
bugs:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1919090
data_reviews:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1919090#c5
expires: never
data_sensitivity:
- technical
gl_fragment_shader:
type: string
description: >
Hash of the transformed source of the fragment shader.
lifetime: application
send_in_pings:
- user-characteristics
notification_emails:
- tom@mozilla.com
bugs:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1919090
data_reviews:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1919090#c5
expires: never
data_sensitivity:
- technical
gl_vertex_shader:
type: string
description: >
Hash of the transformed source of the vertex shader.
lifetime: application
send_in_pings:
- user-characteristics
notification_emails:
- tom@mozilla.com
bugs:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1919090
data_reviews:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1919090#c5
expires: never
data_sensitivity:
- technical
gl_minimal_source:
type: text
description: >
Transformed source of the minimal shader.
lifetime: application
send_in_pings:
- user-characteristics
notification_emails:
- tom@mozilla.com
bugs:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1919090
data_reviews:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1919090#c5
expires: never
data_sensitivity:
# Text metrics are _required_ to be web_activity or highly_sensitive, so even though this
# is more like 'technical' (per the Data Review), I'm marking highly sensitive.
- highly_sensitive
gl_params_extensions:
type: text
description: >
The list of GL parameters of the extensions.
lifetime: application
send_in_pings:
- user-characteristics
notification_emails:
- tom@mozilla.com
bugs:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1919090
data_reviews:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1919090#c5
expires: never
data_sensitivity:
# Text metrics are _required_ to be web_activity or highly_sensitive, so even though this
# is more like 'technical' (per the Data Review), I'm marking highly sensitive.
- highly_sensitive
gl_params_v1:
type: text
description: >
The list of GL parameters of GL1.
lifetime: application
send_in_pings:
- user-characteristics
notification_emails:
- tom@mozilla.com
bugs:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1919090
data_reviews:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1919090#c5
expires: never
data_sensitivity:
# Text metrics are _required_ to be web_activity or highly_sensitive, so even though this
# is more like 'technical' (per the Data Review), I'm marking highly sensitive.
- highly_sensitive
gl_params_v2:
type: text
description: >
The list of GL parameters of GL2.
lifetime: application
send_in_pings:
- user-characteristics
notification_emails:
- tom@mozilla.com
bugs:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1919090
data_reviews:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1919090#c5
expires: never
data_sensitivity:
# Text metrics are _required_ to be web_activity or highly_sensitive, so even though this
# is more like 'technical' (per the Data Review), I'm marking highly sensitive.
- highly_sensitive
gl_precision_fragment:
type: text
description: >
Precisions of the fragment shader.
lifetime: application
send_in_pings:
- user-characteristics
notification_emails:
- tom@mozilla.com
bugs:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1919090
data_reviews:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1919090#c5
expires: never
data_sensitivity:
# Text metrics are _required_ to be web_activity or highly_sensitive, so even though this
# is more like 'technical' (per the Data Review), I'm marking highly sensitive.
- highly_sensitive
gl_precision_vertex:
type: text
description: >
Precisions of the vertex shader.
lifetime: application
send_in_pings:
- user-characteristics
notification_emails:
- tom@mozilla.com
bugs:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1919090
data_reviews:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1919090#c5
expires: never
data_sensitivity:
# Text metrics are _required_ to be web_activity or highly_sensitive, so even though this
# is more like 'technical' (per the Data Review), I'm marking highly sensitive.
- highly_sensitive
prefs_network_cookie_cookiebehavior: # network.cookie.cookieBehavior
type: quantity
unit: int

Просмотреть файл

@ -667,7 +667,7 @@ const RefPtr<PopulatePromise>& TimoutPromise(
// metric is set, this variable should be incremented. It'll be a lot. It's
// okay. We're going to need it to know (including during development) what is
// the source of the data we are looking at.
const int kSubmissionSchema = 5;
const int kSubmissionSchema = 6;
const auto* const kUUIDPref =
"toolkit.telemetry.user_characteristics_ping.uuid";