MCPcopy
hub / github.com/feast-dev/feast / build

Function build

ui/src/pages/monitoring/components/TimeSeriesAnalysis.tsx:441–458  ·  view source on GitHub ↗
(
      label: string,
      color: string,
      accessor: (m: FeatureMetric) => number | null,
      dashArray?: string,
    )

Source from the content-addressed store, hash-verified

439}) => {
440 const driftSeries: LineSeriesData[] = useMemo(() => {
441 const build = (
442 label: string,
443 color: string,
444 accessor: (m: FeatureMetric) => number | null,
445 dashArray?: string,
446 ): LineSeriesData => ({
447 label,
448 color,
449 dashArray,
450 points: metrics
451 .filter((m) => accessor(m) !== null)
452 .map((m) => ({
453 x: toX(m),
454 y: 0,
455 value: accessor(m)!,
456 date: m.metric_date,
457 })),
458 });
459 return [
460 build("Mean", COLORS[0], (m) => m.mean, "6,3"),
461 build("P50", COLORS[1], (m) => m.p50),

Callers 1

NumericTimeSeriesFunction · 0.70

Calls 2

toXFunction · 0.85
filterMethod · 0.45

Tested by

no test coverage detected