Skip to content

Conversation

@aidanCQ
Copy link
Collaborator

@aidanCQ aidanCQ commented Aug 12, 2025

Client reads from single source of truth (disk) to avoid sync or staleness issues.

@aidanCQ aidanCQ requested a review from a team as a code owner August 12, 2025 10:29
@aidanCQ aidanCQ requested review from AnnaAbdulova and removed request for a team and AnnaAbdulova August 12, 2025 10:29
@aidanCQ
Copy link
Collaborator Author

aidanCQ commented Aug 12, 2025

@respx.mock
def test_latency() -> None:
    fake_date = "foo"
    path = "/api/projects/v1beta"
    respx.get(f"{get_nexus_client().base_url}{path}").mock(
        return_value=httpx.Response(
            status_code=200,
            json={"data": {}},
            headers={"Sunset": fake_date},
        )
    )
    start = time.time()
    for n in range(20):
        with warnings.catch_warnings(record=True) as captured:
            qnx.projects.get_all().list()
            print(n)

    end = time.time()
    length = end - start

Main

  • 0.012s
  • 0.013s
  • 0.013s

This branch

  • 0.015s
  • 0.014s
  • 0.015s

0.003s difference.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants