useStorageReport.ts 863 B

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