import { type NetworkStatus } from '@dxos/client/mesh';
import { type EchoDataStats } from '@dxos/echo-pipeline';
import { type QueryEdgeStatusResponse } from '@dxos/protocols/proto/dxos/client/services';
import { type Diagnostics } from '@dxos/tracing';
/**
 * https://developer.mozilla.org/en-US/docs/Web/API/Performance/memory
 * https://github.com/WICG/performance-measure-memory
 * https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts
 * https://caniuse.com/mdn-api_performance_measureuseragentspecificmemory
 * https://web.dev/articles/coop-coep
 */
export type MemoryInfo = {
    jsHeapSizeLimit: number;
    totalJSHeapSize: number;
    usedJSHeapSize: number;
    used: number;
};
/**
 * Represents the @info props in QueryState.
 */
export type QueryInfo = {
    filter: any;
    metrics: any;
    active: boolean;
};
/**
 *
 */
export type DatabaseInfo = {
    spaces: number;
    objects: number;
    documents: number;
    documentsToReconcile: number;
    dataStats?: EchoDataStats;
};
/**
 *
 */
export type Stats = {
    performanceEntries?: PerformanceEntry[];
    diagnostics?: Diagnostics;
    database?: DatabaseInfo;
    queries?: QueryInfo[];
    memory?: MemoryInfo;
    network?: NetworkStatus;
    edge?: QueryEdgeStatusResponse;
};
/**
 * https://developer.mozilla.org/en-US/docs/Web/API/Performance_API/Performance_data#performance_entries
 * @param entryTypes
 */
export declare const usePerformanceObserver: (entryTypes: string[]) => PerformanceEntryList | undefined;
export declare const useStats: () => [Stats, () => void];
export declare const removeEmpty: (obj: any) => any;
//# sourceMappingURL=useStats.d.ts.map