|
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
|
|
} from '@ant-design/icons';
|
|
|
|
|
import dayjs, { type Dayjs } from 'dayjs';
|
|
|
|
|
import { api, errMsg } from '@/lib/api';
|
|
|
|
|
import { formatUtcTime, nearestRankPercentile } from '@/lib/format';
|
|
|
|
|
import { formatUtcTime, percentile } from '@/lib/format';
|
|
|
|
|
import type {
|
|
|
|
|
AdRevenueDaily,
|
|
|
|
|
AdRevenueHourly,
|
|
|
|
@@ -758,9 +758,9 @@ export default function AdRevenueReportPage() {
|
|
|
|
|
.filter((item) => item.feed_scene === sceneName)
|
|
|
|
|
.map((item) => item.sub_count ?? 1);
|
|
|
|
|
return {
|
|
|
|
|
p5: nearestRankPercentile(counts, 0.05),
|
|
|
|
|
p50: nearestRankPercentile(counts, 0.5),
|
|
|
|
|
p95: nearestRankPercentile(counts, 0.95),
|
|
|
|
|
p5: percentile(counts, 0.05, false),
|
|
|
|
|
p50: percentile(counts, 0.5, false),
|
|
|
|
|
p95: percentile(counts, 0.95, false),
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
return { coupon: summarize('coupon'), comparison: summarize('comparison') };
|
|
|
|
@@ -1083,12 +1083,12 @@ export default function AdRevenueReportPage() {
|
|
|
|
|
</Typography.Text>
|
|
|
|
|
</Divider>
|
|
|
|
|
<Row gutter={[16, 12]}>
|
|
|
|
|
<Col span={4}><Statistic title="单次领券广告数 P5" value={sessionAdCounts.coupon.p5 ?? '-'} precision={0} /></Col>
|
|
|
|
|
<Col span={4}><Statistic title="单次领券广告数 P50" value={sessionAdCounts.coupon.p50 ?? '-'} precision={0} /></Col>
|
|
|
|
|
<Col span={4}><Statistic title="单次领券广告数 P95" value={sessionAdCounts.coupon.p95 ?? '-'} precision={0} /></Col>
|
|
|
|
|
<Col span={4}><Statistic title="单次比价广告数 P5" value={sessionAdCounts.comparison.p5 ?? '-'} precision={0} /></Col>
|
|
|
|
|
<Col span={4}><Statistic title="单次比价广告数 P50" value={sessionAdCounts.comparison.p50 ?? '-'} precision={0} /></Col>
|
|
|
|
|
<Col span={4}><Statistic title="单次比价广告数 P95" value={sessionAdCounts.comparison.p95 ?? '-'} precision={0} /></Col>
|
|
|
|
|
<Col span={4}><Statistic title="单次领券广告数 P5" value={sessionAdCounts.coupon.p5 ?? '-'} precision={1} /></Col>
|
|
|
|
|
<Col span={4}><Statistic title="单次领券广告数 P50" value={sessionAdCounts.coupon.p50 ?? '-'} precision={1} /></Col>
|
|
|
|
|
<Col span={4}><Statistic title="单次领券广告数 P95" value={sessionAdCounts.coupon.p95 ?? '-'} precision={1} /></Col>
|
|
|
|
|
<Col span={4}><Statistic title="单次比价广告数 P5" value={sessionAdCounts.comparison.p5 ?? '-'} precision={1} /></Col>
|
|
|
|
|
<Col span={4}><Statistic title="单次比价广告数 P50" value={sessionAdCounts.comparison.p50 ?? '-'} precision={1} /></Col>
|
|
|
|
|
<Col span={4}><Statistic title="单次比价广告数 P95" value={sessionAdCounts.comparison.p95 ?? '-'} precision={1} /></Col>
|
|
|
|
|
</Row>
|
|
|
|
|
</Card>
|
|
|
|
|
)}
|
|
|
|
|