diff --git a/module.yaml b/module.yaml index da07715..bebb81b 100644 --- a/module.yaml +++ b/module.yaml @@ -1,7 +1,7 @@ # The docs module's manifest for quality-sdk: the user guide, a static site # with no data of its own and nothing it requires. name: docs -version: 0.6.2 +version: 0.6.3 # Served at /docs on the installation's web entry point (quality-sdk # decision 0002): the agent writes Traefik's route to the `web` service, diff --git a/src/charts/examples.test.ts b/src/charts/examples.test.ts index 2bfa7c3..ad11c73 100644 --- a/src/charts/examples.test.ts +++ b/src/charts/examples.test.ts @@ -3,8 +3,8 @@ import { figure } from "../chart-kit/index"; import { CATALOG, chart, EXAMPLE_IDS } from "./examples"; describe("the example charts", () => { - it("draw one example for each of the product's 18 catalogue charts, and no other", () => { - expect(Object.keys(CATALOG)).toHaveLength(18); + it("draw one example for each of the product's 17 catalogue charts, and no other", () => { + expect(Object.keys(CATALOG)).toHaveLength(17); expect([...Object.values(CATALOG)].sort()).toEqual([...EXAMPLE_IDS].sort()); }); diff --git a/src/charts/examples.ts b/src/charts/examples.ts index 7817ce0..51f6bff 100644 --- a/src/charts/examples.ts +++ b/src/charts/examples.ts @@ -1,7 +1,8 @@ // The guide's example charts, by name: each drawn with made-up figures, to // show how a chart of the product reads, never any organisation's data. // One example per chart of the product's catalogue (CATALOG below), each in -// the section of the formulas page that defines it. +// the section of the formulas page that defines it. The product draws these +// charts in the quality dashboard in Superset, from gold. import type { Figure, Lang } from "../chart-kit/index"; import { DISTRIBUTION_CHARTS } from "./distributions"; @@ -39,7 +40,6 @@ export const CATALOG: Record = { update_recency: "recency", profiling: "profiling", conformity_by_rule: "rule-conformity", - time_by_stage: "performance", }; /** Every example's name. */ diff --git a/src/charts/fields.ts b/src/charts/fields.ts index 44f0411..46fb232 100644 --- a/src/charts/fields.ts +++ b/src/charts/fields.ts @@ -1,5 +1,5 @@ -// The example charts of the fields and of the run: how long ago the records -// were updated, the fields' profile, and the time per stage. +// The example charts of the fields: how long ago the records were updated, +// and the fields' profile. import { bars, columns, num, pct } from "../chart-kit/index"; import { RECORDS } from "./rules"; @@ -106,55 +106,7 @@ const profiling: Example = { }, }; -const performance: Example = { - query: ["Registro de la evaluación", "Evaluation log"], - needs: NOTHING, - make: (lang) => { - const fields = 40; - const previousRecords = 54_300; - // Each stage's milliseconds in this cut and in the previous one. - const stages: [Text, number, number][] = [ - [["Cargar el corte", "Load the cut"], 4_150, 4_090], - [["Ejecutar las reglas", "Run the rules"], 16_200, 15_300], - [["Perfilar", "Profile"], 2_400, 2_380], - [["ICD y grupos", "ICD and groups"], 2_850, 2_790], - [["Colas de remediación", "Remediation queues"], 1_310, 1_280], - [["Recencia de actualización", "Update recency"], 200, 190], - [["Distribuciones", "Distributions"], 920, 900], - ]; - const millions = (RECORDS * fields) / 1e6; - const previousMillions = (previousRecords * fields) / 1e6; - const rows = stages.map(([t, ms]) => ({ label: pick(lang, t), value: ms / millions })); - const f = (v: number) => `${num(lang, v)} ms`; - return { - title: pick(lang, ["Tiempo por etapa", "Time per stage"]), - note: pick(lang, [ - `Milisegundos por millón de valores: ${num(lang, RECORDS)} registros × ${fields} campos mapeados = ${num(lang, millions, 3)} millones.`, - `Milliseconds per million values: ${num(lang, RECORDS)} records × ${fields} mapped fields = ${num(lang, millions, 3)} million.`, - ]), - plot: { - svg: bars({ rows, max: 8000, fmt: f, labelWidth: 190 }), - table: { - head: [ - pick(lang, ["Etapa", "Stage"]), - pick(lang, ["Tiempo", "Time"]), - pick(lang, ["Por millón", "Per million"]), - pick(lang, ["Por millón, corte anterior", "Per million, previous cut"]), - ], - rows: stages.map(([t, ms, prev]) => [ - pick(lang, t), - f(ms), - f(ms / millions), - f(prev / previousMillions), - ]), - }, - }, - }; - }, -}; - export const FIELD_CHARTS: Record = { recency, profiling, - performance, }; diff --git a/src/charts/icd.ts b/src/charts/icd.ts index 0571e92..6ec36e1 100644 --- a/src/charts/icd.ts +++ b/src/charts/icd.ts @@ -55,7 +55,7 @@ const lowestIcd: Example = { }; const icdDistribution: Example = { - query: ["ICD por entidad", "Entity ICD"], + query: ["Vista agregada: distribución del ICD", "Aggregate view: ICD distribution"], needs: AN_ENTITY, make: (lang) => { // Bins from 0.40: the lower ones have no entities and are not drawn. @@ -98,7 +98,7 @@ const icdDistribution: Example = { }; const bandsBySegment: Example = { - query: ["ICD por entidad", "Entity ICD"], + query: ["Vista agregada: bandas por segmento", "Aggregate view: bands by segment"], needs: [ "una llave de entidad y un segmento (aquí, tipo de cliente)", "an entity key and a segment (here, customer type)", @@ -132,7 +132,7 @@ const bandsBySegment: Example = { }; const bandTransitions: Example = { - query: ["ICD por entidad, 2 cortes", "Entity ICD, 2 cuts"], + query: ["Vista agregada: transiciones entre bandas, 2 cortes", "Aggregate view: band transitions, 2 cuts"], needs: ["una llave de entidad y dos cortes", "an entity key and two cuts"], make: (lang) => { const names = bands(lang).map((b, i) => `${BAND_ICONS[i]} ${b.label.split(" (")[0]}`); diff --git a/src/content/docs/es/guide/assumptions.md b/src/content/docs/es/guide/assumptions.md index 56a5bd0..abca18f 100644 --- a/src/content/docs/es/guide/assumptions.md +++ b/src/content/docs/es/guide/assumptions.md @@ -84,8 +84,8 @@ Ninguna gráfica las muestra: coherencia con las transacciones. El ICD calcula solo C, S y A. - **Colas separadas por causa**, de captura o sistémica, y atípicos separados en errores probables y valores legítimos. -- **Un ANS cumplido contra una meta.** El tiempo por etapa se muestra por - millón de valores junto al del corte anterior, sin una meta que cumplir. +- **Un ANS cumplido contra una meta.** Cuánto tarda cada etapa de una + evaluación es una métrica del sistema en Grafana, sin una meta que cumplir. - **Un IGCD sin actualidad**, y pesos, severidades y umbrales por dataset. - **Un trato según la banda.** El producto calcula la banda; lo que una banda dispara, como una debida diligencia intensificada, lo decide la diff --git a/src/content/docs/es/guide/charts.md b/src/content/docs/es/guide/charts.md index ca1a576..d72adfe 100644 --- a/src/content/docs/es/guide/charts.md +++ b/src/content/docs/es/guide/charts.md @@ -17,7 +17,7 @@ inventados, está en [Formulaciones](../formulas/). - **El corte.** El selector **Corte**, arriba, lista los cortes evaluados del dataset, el más reciente primero. Todas las gráficas muestran el corte elegido. Las que comparan (transiciones de banda, grupos que más - cambiaron, el índice de estabilidad poblacional (PSI), el tiempo por etapa frente al anterior) lo comparan con el + cambiaron, el índice de estabilidad poblacional (PSI)) lo comparan con el **corte evaluado anterior**, no con el mes pasado ni con hoy. - **Las antigüedades se cuentan al corte, nunca a hoy.** "Hasta 30 días", "vencidos" y el hallazgo abierto más antiguo se miden desde la fecha del @@ -286,21 +286,6 @@ la regla está mal planteada. Revisa las más bajas con el dueño de la regla antes de corregir miles de registros. Una regla que aplica a pocos registros oscila mucho entre cortes. -## Tiempo por etapa - -**Pregunta:** ¿la evaluación se vuelve más lenta para el volumen que -procesa? **Qué se ve:** una barra por etapa de la evaluación (cargar el -corte, ejecutar las reglas, perfilar, ICD y grupos, colas de remediación, -recencia de actualización, distribuciones) en milisegundos por millón de -registro-atributos (registros × campos mapeados); la tabla agrega el tiempo -simple y el del corte anterior -([Formulaciones §19](../formulas/#19-tiempo-por-etapa)). Sin -volumen, las barras son milisegundos simples. - -**Cómo leerla.** Compara una etapa con su valor anterior por millón, no en -tiempo simple: una base más grande tarda más sin ser más lenta. Ejecutar las -reglas suele dominar. - ## Errores comunes - **Grupos pequeños.** Un grupo con pocos registros oscila por azar. Confía diff --git a/src/content/docs/es/guide/formulas.mdx b/src/content/docs/es/guide/formulas.mdx index 322e6a4..2056ecb 100644 --- a/src/content/docs/es/guide/formulas.mdx +++ b/src/content/docs/es/guide/formulas.mdx @@ -8,11 +8,16 @@ sidebar: import { Aside } from "@astrojs/starlight/components"; import Chart from "../../../../components/Chart.astro"; -Esta página reúne, para cada una de las 18 gráficas del dashboard de un -dataset, un ejemplo, la fórmula con que Quality Data la calcula y cómo -leerla. Qué hacer con cada gráfica está en [Cómo leer el +Esta página reúne, para cada una de las 17 gráficas del dashboard de +calidad de un dataset, un ejemplo, la fórmula con que Quality Data la +calcula y cómo leerla. El núcleo evalúa las reglas y envía las +notificaciones; las gráficas las dibuja el dashboard de calidad en +Superset, la aplicación de BI de la instalación, a partir de los resultados +en gold. Qué hacer con cada gráfica está en [Cómo leer el dashboard](../charts/); qué significa cada indicador, en [De los resultados -a los indicadores](../indicators/). +a los indicadores](../indicators/). Cuánto tarda cada etapa de una +evaluación es una métrica del sistema, que se ve en Grafana, no una gráfica +del dashboard.