forked from PinSpace-Org/GistPin
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbenchmark-compare.ts
More file actions
57 lines (53 loc) 路 2.73 KB
/
Copy pathbenchmark-compare.ts
File metadata and controls
57 lines (53 loc) 路 2.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
export interface BenchmarkMetric {
label: string;
gistpin: number;
industry: number;
unit: string;
higherIsBetter: boolean;
}
export interface BenchmarkResult {
metrics: BenchmarkMetric[];
overall: number;
comparisonPeriod: string;
}
export function getBenchmarkData(
category: 'general' | 'engagement' | 'quality' | 'growth' = 'general',
): BenchmarkResult {
const all: Record<string, BenchmarkMetric[]> = {
general: [
{ label: 'Uptime', gistpin: 99.97, industry: 99.8, unit: '%', higherIsBetter: true },
{ label: 'Avg Response Time', gistpin: 62, industry: 85, unit: 'ms', higherIsBetter: false },
{ label: 'Error Rate', gistpin: 0.27, industry: 0.5, unit: '%', higherIsBetter: false },
{ label: 'Requests / Day', gistpin: 125000, industry: 89000, unit: '', higherIsBetter: true },
{ label: 'P99 Latency', gistpin: 195, industry: 250, unit: 'ms', higherIsBetter: false },
],
engagement: [
{ label: 'Daily Active Users', gistpin: 14200, industry: 9800, unit: '', higherIsBetter: true },
{ label: 'Session Duration', gistpin: 8.4, industry: 5.2, unit: 'min', higherIsBetter: true },
{ label: 'Actions / Session', gistpin: 4.7, industry: 3.1, unit: '', higherIsBetter: true },
{ label: 'Bounce Rate', gistpin: 32, industry: 45, unit: '%', higherIsBetter: false },
{ label: 'Return Rate', gistpin: 68, industry: 52, unit: '%', higherIsBetter: true },
],
quality: [
{ label: 'Content Approval Rate', gistpin: 94, industry: 87, unit: '%', higherIsBetter: true },
{ label: 'Spam Detected', gistpin: 3.2, industry: 7.8, unit: '%', higherIsBetter: false },
{ label: 'Avg Content Score', gistpin: 8.6, industry: 6.9, unit: '/10', higherIsBetter: true },
{ label: 'Flag Rate', gistpin: 2.1, industry: 4.5, unit: '%', higherIsBetter: false },
],
growth: [
{ label: 'MoM User Growth', gistpin: 12.4, industry: 6.8, unit: '%', higherIsBetter: true },
{ label: 'MoM Content Growth', gistpin: 18.2, industry: 9.5, unit: '%', higherIsBetter: true },
{ label: 'Retention (D1)', gistpin: 58, industry: 42, unit: '%', higherIsBetter: true },
{ label: 'Retention (D7)', gistpin: 34, industry: 22, unit: '%', higherIsBetter: true },
{ label: 'Retention (D30)', gistpin: 18, industry: 10, unit: '%', higherIsBetter: true },
],
};
return {
metrics: all[category],
overall: 62,
comparisonPeriod: 'Q2 2026 vs Industry Q2 2026',
};
}
export function getCategories(): string[] {
return ['general', 'engagement', 'quality', 'growth'];
}