[libcxx] [llvm] [libc++] Add tools for gathering historical benchmark data (PR #212775)
Aiden Grossman via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 5 09:01:46 PDT 2026
================
@@ -0,0 +1,211 @@
+#!/usr/bin/env python3
+# ===----------------------------------------------------------------------===##
+#
+# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+# See https://llvm.org/LICENSE.txt for license information.
+# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+#
+# ===----------------------------------------------------------------------===##
+
+from typing import Dict, List, Optional, Sequence, Tuple
+import argparse
+import datetime
+import logging
+import os
+import pathlib
+import subprocess
+import sys
+import tabulate
+
+
+# Commits that cannot change the performance of the library are not worth
+# benchmarking. This is the set of paths we consider for libc++ changes.
+BENCHMARK_PATHS = ['libcxx/include', 'libcxx/src']
+
+GRANULARITIES = ('day', 'week', 'month')
+
+# The UTC timestamp at which a commit landed, in seconds since the epoch, and the
+# commit SHA itself. That order is deliberate: it sorts chronologically by default,
+# and comparing two of them falls back to the SHA when the timestamps are equal, which
+# makes this tool deterministic.
+Commit = Tuple[int, str]
----------------
boomanaiden154 wrote:
A named tuple here might be better?
https://github.com/llvm/llvm-project/pull/212775
More information about the llvm-commits
mailing list