QueryInsightsChart.constants.ts 874 B

12345678910111213141516171819202122
  1. import { CHART_COLORS } from '@/components/ui/Charts/Charts.constants'
  2. export const CHART_TABS = [
  3. { id: 'query_latency', label: 'Query latency' },
  4. { id: 'rows_read', label: 'Rows read' },
  5. { id: 'calls', label: 'Calls' },
  6. { id: 'cache_hits', label: 'Cache hits' },
  7. ]
  8. export const LEGEND_ITEMS: Record<string, { label: string; color: string; dataKey: string }[]> = {
  9. query_latency: [
  10. { label: 'P50', color: 'hsl(var(--chart-4))', dataKey: 'p50' },
  11. { label: 'P95', color: CHART_COLORS.GREEN_1, dataKey: 'p95' },
  12. ],
  13. rows_read: [{ label: 'Rows Read', color: CHART_COLORS.GREEN_1, dataKey: 'rows_read' }],
  14. calls: [{ label: 'Calls', color: CHART_COLORS.GREEN_1, dataKey: 'calls' }],
  15. cache_hits: [{ label: 'Cache Hits', color: '#10B981', dataKey: 'cache_hits' }],
  16. }
  17. export const CHART_TYPE = 'linear'
  18. export const SEL_COLOR = 'hsl(var(--chart-blue))'