From 2b3bc833231d77b15c31a6d85d663ed3964d9f28 Mon Sep 17 00:00:00 2001
From: codygunton <codygunton@gmail.com>
Date: Mon, 19 Feb 2024 17:23:18 +0000
Subject: [PATCH 1/2] Remove unused dir.

---
 .../benchmark/protogalaxy_round_bench/CMakeLists.txt             | 1 -
 1 file changed, 1 deletion(-)
 delete mode 100644 barretenberg/cpp/src/barretenberg/benchmark/protogalaxy_round_bench/CMakeLists.txt

diff --git a/barretenberg/cpp/src/barretenberg/benchmark/protogalaxy_round_bench/CMakeLists.txt b/barretenberg/cpp/src/barretenberg/benchmark/protogalaxy_round_bench/CMakeLists.txt
deleted file mode 100644
index e7dcee6d05f..00000000000
--- a/barretenberg/cpp/src/barretenberg/benchmark/protogalaxy_round_bench/CMakeLists.txt
+++ /dev/null
@@ -1 +0,0 @@
-barretenberg_module(protogalaxy_rounds_bench ultra_honk protogalaxy stdlib_primitives)
\ No newline at end of file

From cb90e33abaf5b41b1b1c9e79bc69cb075367a72a Mon Sep 17 00:00:00 2001
From: codygunton <codygunton@gmail.com>
Date: Mon, 19 Feb 2024 19:10:01 +0000
Subject: [PATCH 2/2] Add GUH bench

---
 .../ultra_bench/goblin_ultra_honk.bench.cpp   | 54 +++++++++++++++++++
 1 file changed, 54 insertions(+)
 create mode 100644 barretenberg/cpp/src/barretenberg/benchmark/ultra_bench/goblin_ultra_honk.bench.cpp

diff --git a/barretenberg/cpp/src/barretenberg/benchmark/ultra_bench/goblin_ultra_honk.bench.cpp b/barretenberg/cpp/src/barretenberg/benchmark/ultra_bench/goblin_ultra_honk.bench.cpp
new file mode 100644
index 00000000000..98a42f0bab4
--- /dev/null
+++ b/barretenberg/cpp/src/barretenberg/benchmark/ultra_bench/goblin_ultra_honk.bench.cpp
@@ -0,0 +1,54 @@
+#include <benchmark/benchmark.h>
+
+#include "barretenberg/benchmark/ultra_bench/mock_proofs.hpp"
+#include "barretenberg/proof_system/circuit_builder/goblin_ultra_circuit_builder.hpp"
+#include "barretenberg/ultra_honk/ultra_composer.hpp"
+
+using namespace benchmark;
+using namespace bb;
+
+/**
+ * @brief Benchmark: Construction of a Ultra Honk proof for a circuit determined by the provided circuit function
+ */
+static void construct_proof_goblinultrahonk(State& state,
+                                            void (*test_circuit_function)(GoblinUltraCircuitBuilder&, size_t)) noexcept
+{
+    size_t num_iterations = 10; // 10x the circuit
+    bb::mock_proofs::construct_proof_with_specified_num_iterations<GoblinUltraComposer>(
+        state, test_circuit_function, num_iterations);
+}
+
+/**
+ * @brief Benchmark: Construction of a Ultra Plonk proof with 2**n gates
+ */
+static void construct_proof_goblinultrahonk_power_of_2(State& state) noexcept
+{
+    auto log2_of_gates = static_cast<size_t>(state.range(0));
+    bb::mock_proofs::construct_proof_with_specified_num_iterations<GoblinUltraComposer>(
+        state, &bb::mock_proofs::generate_basic_arithmetic_circuit<GoblinUltraCircuitBuilder>, log2_of_gates);
+}
+
+// Define benchmarks
+BENCHMARK_CAPTURE(construct_proof_goblinultrahonk,
+                  sha256,
+                  &stdlib::generate_sha256_test_circuit<GoblinUltraCircuitBuilder>)
+    ->Unit(kMillisecond);
+BENCHMARK_CAPTURE(construct_proof_goblinultrahonk,
+                  keccak,
+                  &stdlib::generate_keccak_test_circuit<GoblinUltraCircuitBuilder>)
+    ->Unit(kMillisecond);
+BENCHMARK_CAPTURE(construct_proof_goblinultrahonk,
+                  ecdsa_verification,
+                  &stdlib::generate_ecdsa_verification_test_circuit<GoblinUltraCircuitBuilder>)
+    ->Unit(kMillisecond);
+BENCHMARK_CAPTURE(construct_proof_goblinultrahonk,
+                  merkle_membership,
+                  &stdlib::generate_merkle_membership_test_circuit<GoblinUltraCircuitBuilder>)
+    ->Unit(kMillisecond);
+
+BENCHMARK(construct_proof_goblinultrahonk_power_of_2)
+    // 2**15 gates to 2**20 gates
+    ->DenseRange(15, 20)
+    ->Unit(kMillisecond);
+
+BENCHMARK_MAIN();