useStorageReport.ts33 lines · main
1import { vi } from 'vitest'
2
3export const useStorageReport = vi.fn().mockReturnValue({
4 data: {
5 cacheHitRate: [
6 { hit_count: 15, miss_count: 0, timestamp: 1715230800000000 },
7 { hit_count: 1542, miss_count: 15, timestamp: 1715227200000000 },
8 ],
9 topCacheMisses: [
10 {
11 count: 3,
12 path: '/storage/v1/object/public/videos/docs/guides/edge-functions-inference.mp4',
13 },
14 { count: 2, path: '/storage/v1/object/public/videos/marketing/tabTableEditor.mp4' },
15 ],
16 },
17 params: {
18 cacheHitRate: {
19 iso_timestamp_start: '2024-05-09T03:00:00.000Z',
20 project: 'default',
21 sql: '',
22 },
23 topCacheMisses: {
24 iso_timestamp_start: '2024-05-09T03:00:00.000Z',
25 project: 'default',
26 sql: '',
27 },
28 },
29 filters: [],
30 isLoading: false,
31 mergeParams: vi.fn(),
32 refresh: vi.fn(),
33})