• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

pantsbuild / pants / 26763765159
93%

Build:
DEFAULT BRANCH: main
Ran 01 Jun 2026 03:31PM UTC
Jobs 12
Files 1755
Run time 6min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

01 Jun 2026 03:12PM UTC coverage: 92.782% (-0.01%) from 92.792%
26763765159

push

github

web-flow
perf: Port FrozenOrderedSet to rust (#23200)

Followup to #22501. Same approach — `FrozenOrderedSet` is now a pyo3
`#[pyclass]` backed by `Py<PyDict>` with lazy hash via `OnceLock`. The
end goal is porting more rule code to rust intrinsics.


```python
"""Benchmark: Rust FrozenOrderedSet vs Python FrozenOrderedSet."""

import sys
import timeit
from collections.abc import Hashable, Iterable, Iterator
from typing import AbstractSet, Any, TypeVar

sys.path.insert(0, "src/python")

from pants.engine.internals.native_engine import FrozenOrderedSet as RustFrozenOrderedSet

T = TypeVar("T")


class PyFrozenOrderedSet(AbstractSet[T], Hashable):
    """The old pure-Python FrozenOrderedSet (pre-port)."""

    def __init__(self, iterable=None):
        self._items = dict.fromkeys(iterable) if iterable else {}
        self._hash = None

    def __len__(self):
        return len(self._items)

    def __contains__(self, key):
        return key in self._items

    def __iter__(self) -> Iterator:
        return iter(self._items)

    def __reversed__(self):
        return reversed(tuple(self._items.keys()))

    def __eq__(self, other):
        if not isinstance(other, self.__class__):
            return NotImplemented
        return len(self._items) == len(other._items) and all(
            x == y for x, y in zip(self._items, other._items)
        )

    def __hash__(self):
        if self._hash is None:
            self._hash = 0
            for item in self._items.keys():
                self._hash ^= hash(item)
        return self._hash

    def __repr__(self):
        return f"PyFrozenOrderedSet({list(self)!r})"

    def __bool__(self):
        return bool(self._items)

    def union(self, other):
        return self.__class__(list(self) + [x for x in other if x not in self._items])

    def intersection(self, other):
        s = set(other)
        return self.__class__(x for x in self if x in s)

    def difference(self, other):
        s = set(other)
        ... (continued)

7 of 7 new or added lines in 3 files covered. (100.0%)

9 existing lines in 1 file now uncovered.

93050 of 100289 relevant lines covered (92.78%)

4.02 hits per line

Coverage Regressions

Lines Coverage ∆ File
9
94.74
-3.16% src/python/pants/core/goals/lint_test.py
Jobs
ID Job ID Ran Files Coverage
1 test_python_linux_x86_64_7/10 - 26763765159.1 01 Jun 2026 03:48PM UTC 1209
51.04
GitHub Action Run
2 test_python_linux_x86_64_8/10 - 26763765159.2 01 Jun 2026 03:46PM UTC 1206
53.03
GitHub Action Run
3 test_python_linux_x86_64_5/10 - 26763765159.3 01 Jun 2026 03:38PM UTC 1219
59.15
GitHub Action Run
4 test_python_linux_arm64 - 26763765159.4 01 Jun 2026 03:33PM UTC 1187
52.01
GitHub Action Run
5 test_python_linux_x86_64_9/10 - 26763765159.5 01 Jun 2026 03:40PM UTC 1215
53.63
GitHub Action Run
6 test_python_linux_x86_64_1/10 - 26763765159.6 01 Jun 2026 03:42PM UTC 1203
49.26
GitHub Action Run
7 test_python_linux_x86_64_4/10 - 26763765159.7 01 Jun 2026 03:44PM UTC 1238
59.06
GitHub Action Run
8 test_python_linux_x86_64_2/10 - 26763765159.8 01 Jun 2026 03:39PM UTC 1208
58.6
GitHub Action Run
9 test_python_linux_x86_64_3/10 - 26763765159.9 01 Jun 2026 03:41PM UTC 1204
53.6
GitHub Action Run
10 test_python_linux_x86_64_0/10 - 26763765159.10 01 Jun 2026 03:41PM UTC 1223
56.21
GitHub Action Run
11 test_python_macos14_arm64 - 26763765159.11 01 Jun 2026 03:31PM UTC 1187
52.02
GitHub Action Run
12 test_python_linux_x86_64_6/10 - 26763765159.12 01 Jun 2026 03:40PM UTC 1199
49.28
GitHub Action Run
Source Files on build 26763765159
  • Tree
  • List 1755
  • Changed 7
  • Source Changed 4
  • Coverage Changed 6
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #26763765159
  • 43fc07a8 on github
  • Prev Build on main (#26660759349)
  • Next Build on main (#26764227497)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc