From 45c54523100881071275bd5fe7242a1d46558ba9 Mon Sep 17 00:00:00 2001
From: Jonathan Evans <4038905+jrhe@users.noreply.github.com>
Date: Wed, 24 Jun 2026 19:33:27 +0100
Subject: [PATCH] Add UniConsent benchmark
---
benchmarks/with-uniconsent/app/layout.tsx | 25 +++++++++++++
benchmarks/with-uniconsent/app/page.tsx | 7 ++++
benchmarks/with-uniconsent/config.json | 43 +++++++++++++++++++++++
benchmarks/with-uniconsent/next-env.d.ts | 5 +++
benchmarks/with-uniconsent/next.config.ts | 7 ++++
benchmarks/with-uniconsent/package.json | 26 ++++++++++++++
benchmarks/with-uniconsent/tsconfig.json | 11 ++++++
pnpm-lock.yaml | 34 ++++++++++++++++++
8 files changed, 158 insertions(+)
create mode 100644 benchmarks/with-uniconsent/app/layout.tsx
create mode 100644 benchmarks/with-uniconsent/app/page.tsx
create mode 100644 benchmarks/with-uniconsent/config.json
create mode 100644 benchmarks/with-uniconsent/next-env.d.ts
create mode 100644 benchmarks/with-uniconsent/next.config.ts
create mode 100644 benchmarks/with-uniconsent/package.json
create mode 100644 benchmarks/with-uniconsent/tsconfig.json
diff --git a/benchmarks/with-uniconsent/app/layout.tsx b/benchmarks/with-uniconsent/app/layout.tsx
new file mode 100644
index 0000000..bcc7d59
--- /dev/null
+++ b/benchmarks/with-uniconsent/app/layout.tsx
@@ -0,0 +1,25 @@
+import type { Metadata } from "next";
+import type { ReactNode } from "react";
+
+export const metadata: Metadata = {
+ title: "benchmark",
+};
+
+export default function RootLayout({
+ children,
+}: Readonly<{
+ children: ReactNode;
+}>) {
+ return (
+
+
+ {/* biome-ignore lint/nursery/noSyncScripts: UniConsent's install snippet requires synchronous stubs before the CMP script. */}
+
+ {/* biome-ignore lint/nursery/noSyncScripts: UniConsent's install snippet requires synchronous stubs before the CMP script. */}
+
+
+
+ {children}
+
+ );
+}
diff --git a/benchmarks/with-uniconsent/app/page.tsx b/benchmarks/with-uniconsent/app/page.tsx
new file mode 100644
index 0000000..cb954f2
--- /dev/null
+++ b/benchmarks/with-uniconsent/app/page.tsx
@@ -0,0 +1,7 @@
+export default function Home() {
+ return (
+
+
Benchmark
+
+ );
+}
diff --git a/benchmarks/with-uniconsent/config.json b/benchmarks/with-uniconsent/config.json
new file mode 100644
index 0000000..e0c85fb
--- /dev/null
+++ b/benchmarks/with-uniconsent/config.json
@@ -0,0 +1,43 @@
+{
+ "$schema": "./node_modules/@cookiebench/benchmark-schema/schema.json",
+ "name": "with-uniconsent",
+ "id": "uniconsent-banner",
+ "iterations": 20,
+ "cookieBanner": {
+ "selectors": ["#uniccmp .unic-bar"],
+ "serviceHosts": [
+ "cmp.uniconsent.com",
+ "cdn.uniconsent.com",
+ "api.uniconsent.com"
+ ],
+ "waitForVisibility": true,
+ "measureViewportCoverage": true,
+ "expectedLayoutShift": true,
+ "serviceName": "UniConsent"
+ },
+ "internationalization": {
+ "detection": "ip",
+ "stringLoading": "server"
+ },
+ "techStack": {
+ "bundler": "unknown",
+ "bundleType": "iffe",
+ "frameworks": [],
+ "languages": ["javascript"],
+ "packageManager": "unknown",
+ "typescript": false
+ },
+ "source": {
+ "isOpenSource": false,
+ "license": "proprietary",
+ "website": "https://www.uniconsent.com"
+ },
+ "company": {
+ "name": "UniConsent",
+ "website": "https://www.uniconsent.com"
+ },
+ "includes": {
+ "backend": "proprietary",
+ "components": ["javascript"]
+ }
+}
diff --git a/benchmarks/with-uniconsent/next-env.d.ts b/benchmarks/with-uniconsent/next-env.d.ts
new file mode 100644
index 0000000..1b3be08
--- /dev/null
+++ b/benchmarks/with-uniconsent/next-env.d.ts
@@ -0,0 +1,5 @@
+///
+///
+
+// NOTE: This file should not be edited
+// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
diff --git a/benchmarks/with-uniconsent/next.config.ts b/benchmarks/with-uniconsent/next.config.ts
new file mode 100644
index 0000000..7921f35
--- /dev/null
+++ b/benchmarks/with-uniconsent/next.config.ts
@@ -0,0 +1,7 @@
+import type { NextConfig } from "next";
+
+const nextConfig: NextConfig = {
+ /* config options here */
+};
+
+export default nextConfig;
diff --git a/benchmarks/with-uniconsent/package.json b/benchmarks/with-uniconsent/package.json
new file mode 100644
index 0000000..a3f3073
--- /dev/null
+++ b/benchmarks/with-uniconsent/package.json
@@ -0,0 +1,26 @@
+{
+ "name": "with-uniconsent",
+ "private": true,
+ "scripts": {
+ "benchmark": "pnpm exec benchmark-cli benchmark",
+ "build": "next build",
+ "dev": "next dev --port 3000",
+ "fmt": "biome format . --write",
+ "lint": "biome lint .",
+ "start": "next start"
+ },
+ "dependencies": {
+ "next": "16.0.7",
+ "react": "^19.2.1",
+ "react-dom": "^19.2.1"
+ },
+ "devDependencies": {
+ "@cookiebench/benchmark-schema": "workspace:*",
+ "@cookiebench/cli": "workspace:*",
+ "@cookiebench/ts-config": "workspace:*",
+ "@types/node": "^24.10.1",
+ "@types/react": "^19.2.7",
+ "@types/react-dom": "^19.2.3",
+ "typescript": "^5.9.3"
+ }
+}
diff --git a/benchmarks/with-uniconsent/tsconfig.json b/benchmarks/with-uniconsent/tsconfig.json
new file mode 100644
index 0000000..787e3f6
--- /dev/null
+++ b/benchmarks/with-uniconsent/tsconfig.json
@@ -0,0 +1,11 @@
+{
+ "extends": "@cookiebench/ts-config/nextjs.json",
+ "compilerOptions": {
+ "baseUrl": ".",
+ "paths": {
+ "@/*": ["./*"]
+ }
+ },
+ "include": ["next-env.d.ts", ".next/types/**/*.ts", "**/*.ts", "**/*.tsx"],
+ "exclude": ["node_modules"]
+}
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 1a07d0f..d545e75 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -422,6 +422,40 @@ importers:
specifier: ^5.9.3
version: 5.9.3
+ benchmarks/with-uniconsent:
+ dependencies:
+ next:
+ specifier: 16.0.7
+ version: 16.0.7(@opentelemetry/api@1.9.0)(@playwright/test@1.57.0)(react-dom@19.2.1(react@19.2.1))(react@19.2.1)
+ react:
+ specifier: ^19.2.1
+ version: 19.2.1
+ react-dom:
+ specifier: ^19.2.1
+ version: 19.2.1(react@19.2.1)
+ devDependencies:
+ '@cookiebench/benchmark-schema':
+ specifier: workspace:*
+ version: link:../../packages/benchmark-schema
+ '@cookiebench/cli':
+ specifier: workspace:*
+ version: link:../../packages/cli
+ '@cookiebench/ts-config':
+ specifier: workspace:*
+ version: link:../../packages/typescript-config
+ '@types/node':
+ specifier: ^24.10.1
+ version: 24.10.1
+ '@types/react':
+ specifier: ^19.2.7
+ version: 19.2.7
+ '@types/react-dom':
+ specifier: ^19.2.3
+ version: 19.2.3(@types/react@19.2.7)
+ typescript:
+ specifier: ^5.9.3
+ version: 5.9.3
+
benchmarks/with-usercentrics:
dependencies:
next: