Home / Function/ SizeAndCounts() — supabase Function Reference

SizeAndCounts() — supabase Function Reference

Architecture documentation for the SizeAndCounts() function in SizeAndCounts.tsx from the supabase codebase.

Entity Profile

Dependency Diagram

graph TD
  16462678_44bf_147c_c1df_cd1f3883bffe["SizeAndCounts()"]
  f313d58a_c706_9bf3_eb3c_2de6b61f112e["dailyUsageToDataPoints()"]
  16462678_44bf_147c_c1df_cd1f3883bffe -->|calls| f313d58a_c706_9bf3_eb3c_2de6b61f112e
  style 16462678_44bf_147c_c1df_cd1f3883bffe fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

apps/studio/components/interfaces/Organization/Usage/SizeAndCounts.tsx lines 22–65

const SizeAndCounts = ({
  orgSlug,
  projectRef,
  subscription,
  currentBillingCycleSelected,
  orgDailyStats,
  isLoadingOrgDailyStats,
  startDate,
  endDate,
}: SizeAndCountsProps) => {
  const chartMeta: {
    [key: string]: { data: DataPoint[]; margin: number; isLoading: boolean }
  } = {
    [PricingMetric.STORAGE_SIZE]: {
      isLoading: isLoadingOrgDailyStats,
      margin: 14,
      data: dailyUsageToDataPoints(
        orgDailyStats,
        (metric) => metric === PricingMetric.STORAGE_SIZE
      ),
    },
    [PricingMetric.DATABASE_SIZE]: {
      isLoading: isLoadingOrgDailyStats,
      margin: 14,
      data: dailyUsageToDataPoints(
        orgDailyStats,
        (metric) => metric === PricingMetric.DATABASE_SIZE
      ),
    },
  }

  return (
    <UsageSection
      orgSlug={orgSlug}
      projectRef={projectRef}
      categoryKey="sizeCount"
      chartMeta={chartMeta}
      subscription={subscription}
      currentBillingCycleSelected={currentBillingCycleSelected}
      startDate={startDate}
      endDate={endDate}
    />
  )
}

Subdomains

Frequently Asked Questions

What does SizeAndCounts() do?
SizeAndCounts() is a function in the supabase codebase.
What does SizeAndCounts() call?
SizeAndCounts() calls 1 function(s): dailyUsageToDataPoints.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free