Skip to content

Pass the TAC data file to the performance example - #463

Draft
jwrosewell wants to merge 2 commits into
mainfrom
fix/performance-tac-data-file
Draft

jwrosewell wants to merge 2 commits into
mainfrom
fix/performance-tac-data-file

Conversation

@jwrosewell

@jwrosewell jwrosewell commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Problem

ci/run-performance-tests.ps1 runs the performance example without a data file. The example then reads 51DEGREES_DD_PATH, and when that isn't set it searches the folders from the repository root for 51Degrees-LiteV4.1.hash (exampleUtils.js).

In the nightly build, ci/fetch-assets.ps1 creates a link with that name under fiftyone.devicedetection.onpremise/tests/ that points to the TAC file. The search takes the last folder in name order first, so it reaches tests/ before the real Lite file in device-detection-cxx/device-detection-data/. The graph is therefore measured with the TAC file at present, but only because of the folder order and a link named after the Lite file.

Change

  • When it exists, passes --datafile fiftyone.devicedetection.onpremise/device-detection-cxx/device-detection-data/Enterprise-HashV41.hash, the link ci/fetch-assets.ps1 makes to the TAC file.
  • Without a license key the TAC file isn't downloaded, so the script writes a warning and runs the example with its default data file, as before.

Verification

  • The edited script passes a PowerShell 7 parse check.
  • The argument block was run locally against a stand-in for the example. With the file present it passed --datafile <path> --jsonoutput results_Test.json, and without it only --jsonoutput results_Test.json.
  • As the nightly build already reaches the TAC file, the graph's figures shouldn't move when this is merged. A step in the graph after merging would mean the old run was using a different file.

Given no data file, the example searches the folders for
51Degrees-LiteV4.1.hash. In the nightly build that search currently finds
the CI's link to the TAC file under tests/ before the Lite file, which
depends on the folder order. Pass the TAC file explicitly, and fall back
to the example's default when there is no TAC file because no licence key
was given.

This branch has not been deployed

No deployments
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.

1 participant