### Background
Remove unused code from `instrumentation.js` in Vector 22 to simplify maintenance and improve performance. We are logging multiple events against the event platform for every search that we never use. This is requiring unnecessary additional processing and downloaded bytes for the user.
The removal here has no visible impact on end users, but it'll make future updates easier for developers.
[[ https://github.com/wikimedia/mediawiki-skins-Vector/blob/master/resources/skins.vector.search/instrumentation.js | instrumentation.js ]]
### User Story
As a developer, I want to remove unused code from `instrumentation.js`, so that the file is cleaner and easier to work with.
- Identify and remove unused code from `instrumentation.js`.
- Ensure no other parts of the app are broken after removal.
- Test to confirm everything works as expected.
- Update docs if needed.
== Requirement
Remove unused performance metrics from instrumentation.js in Vector 2022 and mediawiki.page.ready to simplify maintenance and improve performance. Ensure that this removal does not break existing functionality or impact other parts of the application.
== BDD
```
Feature: Remove unused performance metrics from Vector search instrumentation.js
Scenario: Search functionality with unused performance metrics removed
Given I am on the beta site
When I perform a search using Vector 2022 skin
Then the search results should appear correctly
And I should be able to navigate to a page without errors in the developer console
```
== Test Steps
__**Test Case 1: Verify Search Functionality in Vector 2022 After Code Removal**__
1. Visit https://en.wikipedia.beta.wmflabs.org/w/index.php?title=T352930.
2. Perform a search for any valid term in the search bar.
3. ✅ **AC1**: Confirm that the search results appear correctly and allow navigation to a page.
4. Open the browser’s developer console.
5. ✅ **AC2**: Ensure no errors are logged in the console during the search workflow.
__**Test Case 2: Verify Search Functionality in Vector Skin**__
1. Visit https://en.wikipedia.beta.wmflabs.org/w/index.php?title=T352930&useskin=vector.
2. Perform a search for any valid term in the search bar.
3. ✅ **AC3**: Confirm that the search results appear correctly and allow navigation to a page.
4. Open the browser’s developer console.
5. ✅ **AC4**: Ensure no errors are logged in the console during the search workflow.
###**Acceptance Criteria**
[] The code in mediawiki.page.ready is removed: https://gerrit.wikimedia.org/r/c/mediawiki/core/ /1088636/4/resources/src/mediawiki.page.ready/ready.js#b243
[] the code in Vevtor instrumentation.js is removed
- Unused code is removed.
- Everything still works.
- No regressions.
## QA
1) Visit https://en.wikipedia.beta.wmflabs.org/w/index.php?title=T352930 and perform a search. You should be able to find a page and navigate to a page without seeing any errors in the developer console.
1) Visit https://en.wikipedia.beta.wmflabs.org/w/index.php?title=T352930&useskin=vector and perform a search. You should be able to find a page and navigate to a page without seeing any errors in the developer console.