We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6ede310 commit 51e9271Copy full SHA for 51e9271
1 file changed
scripts/benchmark-svg.ts
@@ -18,11 +18,21 @@ const baseParams = {
18
speed: sanitizeSpeed('8s'),
19
};
20
21
+const deterministicContributionCount = (
22
+ weekIndex: number,
23
+ dayIndex: number
24
+): number => {
25
+ return ((weekIndex * 7 + dayIndex) * 13) % 20;
26
+};
27
+
28
const calendar = {
29
totalContributions: 1240,
30
weeks: Array.from({ length: 14 }, (_, weekIndex) => ({
31
contributionDays: Array.from({ length: 7 }, (_, dayIndex) => ({
- contributionCount: Math.floor(Math.random() * 20),
32
+ contributionCount: deterministicContributionCount(
33
+ weekIndex,
34
+ dayIndex
35
+ ),
36
date: `2026-05-${String(weekIndex * 7 + dayIndex + 1).padStart(2, '0')}`,
37
})),
38
0 commit comments