Skip to content

Commit 2fb4297

Browse files
fix: remove duplicated benchmark content
1 parent be961ad commit 2fb4297

1 file changed

Lines changed: 1 addition & 44 deletions

File tree

scripts/benchmark-svg.ts

Lines changed: 1 addition & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -9,25 +9,6 @@ const stats = {
99
todayDate: '2024-01-07',
1010
};
1111

12-
const baseParams = {
13-
user: 'benchmark-user',
14-
bg: '0d1117',
15-
accent: '00ffaa',
16-
text: 'ffffff',
17-
scale: 'linear' as const,
18-
speed: sanitizeSpeed('8s'),
19-
};
20-
import { performance } from 'perf_hooks';
21-
import { generateSVG } from '../lib/svg/generator';
22-
import { hexColor, sanitizeSpeed } from '../lib/svg/sanitizer';
23-
24-
const stats = {
25-
currentStreak: 12,
26-
longestStreak: 48,
27-
totalContributions: 1240,
28-
todayDate: '2024-01-07',
29-
};
30-
3112
const baseParams = {
3213
user: 'benchmark-user',
3314
bg: '0d1117',
@@ -43,10 +24,7 @@ const calendar = {
4324
weeks: Array.from({ length: 14 }, (_, weekIndex) => ({
4425
contributionDays: Array.from({ length: 7 }, (_, dayIndex) => ({
4526
contributionCount: Math.floor(Math.random() * 20),
46-
date: new Date(
47-
startDate.getTime() +
48-
(weekIndex * 7 + dayIndex) * 24 * 60 * 60 * 1000
49-
)
27+
date: new Date(startDate.getTime() + (weekIndex * 7 + dayIndex) * 24 * 60 * 60 * 1000)
5028
.toISOString()
5129
.split('T')[0],
5230
})),
@@ -126,27 +104,6 @@ function benchmark(): void {
126104

127105
benchmark();
128106

129-
const themes = [
130-
{
131-
name: 'dark',
132-
bg: hexColor('0d1117'),
133-
accent: hexColor('00ffaa'),
134-
text: hexColor('ffffff'),
135-
},
136-
{
137-
name: 'light',
138-
bg: hexColor('ffffff'),
139-
accent: hexColor('ff00aa'),
140-
text: hexColor('111111'),
141-
},
142-
{
143-
name: 'purple',
144-
bg: hexColor('1a1025'),
145-
accent: hexColor('9b5cff'),
146-
text: hexColor('f5f5f5'),
147-
},
148-
];
149-
150107
function benchmark(): void {
151108
console.log('\nSVG Benchmark Results\n');
152109

0 commit comments

Comments
 (0)