Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Performance tests #179

Closed
wants to merge 23 commits into from
Closed

Conversation

Achal1607
Copy link
Member

As a starting step added performance tests to measure how much time it takes to open OpenJDK project.

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Jun 18, 2024
@Achal1607 Achal1607 changed the base branch from main to testing July 17, 2024 04:41
Achal1607 and others added 21 commits July 23, 2024 13:00
…he Explorer panel for non-workspace opened Java files

Fixed runConfiguration.ts: `initializeRunConfiguration()` to search for java files in open editors when no workspace is open.

1. Checked for non-workspace opened files by testing the validity of `vscode.workspace.name` AND `vscode.workspace.workspaceFile`.
2. Searched for java extension file names in `vscode.workspace.textDocuments` when no workspace is open.
3. Fixed `RunConfigurationNode.setValue()` to invoke `WorkspaceConfiguration.update()` with `configurationTarget =` :
    - `true`: when no workspace is open i.e. user global target;
    - `null`: otherwise i.e. workspace target.

Fixes oracle#196

Signed-off-by: Siddharth Srinivasan <[email protected]>
* pre-commit hook to check internal artifactory url

* updated regex

* updated regex
…rkspace

[JAVAVSCODE oracle#196] Run Configuration section is unavailable in the Explorer panel for non-workspace opened Java files
* Upgrade Gradle tooling to Support JDK-22

* updated build.xml

* added one more patch to support upgrade of gradle
…g options in global settings for non-workspace opened Java files (oracle#211)

Fixed extension.ts `UpdateConfigurationRequest` handler to update the global `WorkspaceConfiguration` for non-workspace opened files.

1. Checked for non-workspace opened files by testing if `vscode.workspace.workspaceFile` is undefined/null.
2. Invoked `WorkspaceConfiguration.update()` with `configurationTarget = `:
    - `true`: for non-workspace files;
    - `null`: otherwise.
3. Added a try-catch to log errors in update and prevent downstream failures.
4. Avoided an unnecessary `await` and used the `Thenable` chain of `update()`.

Fixes oracle#199

Signed-off-by: Siddharth Srinivasan <[email protected]>
* backporting NetBeans 23 fixes

* updated patch name

* updated 7548 patch
1. Placed patch files in separate lines to ease merges and reduce conflicts.

2. Added string parsing and trimming of the patches list to allow for placing patch files in separate lines.
    - Also added a check for empty patch list when applying or unapplying the patches.

3. Added a "clean-netbeans" target, similar to the "build-netbeans" target, to help in cleaning just the netbeans build artifacts.

Signed-off-by: Siddharth Srinivasan <[email protected]>
…-cleanup

Ant build script reorganization for patches and clean-netbeans
* Updated README added  Enabling Java preview features section
* [JVSC oracle#199] Backport NetBeans 24 patch 7610

Backporting the NetBeans 24 patch [#7610](apache/netbeans#7610) and
adding it to the patches list in build.xml.

- This brings the fix for getting config options for a single source file to the NB 22 branch.
- This allows the fix for oracle#199 to demonstrate its effect.

Signed-off-by: Siddharth Srinivasan <[email protected]>

* Update build.xml with ascending numeric order of PR patches

Signed-off-by: Siddharth Srinivasan <[email protected]>

---------

Signed-off-by: Siddharth Srinivasan <[email protected]>
Signed-off-by: Subhash Arabhi <[email protected]>
Co-authored-by: Siddharth Srinivasan <[email protected]>
}).timeout(10000);

test("Performance test on OpenJDK repository", async () => {
const args = ["--depth", 1, "--branch", "jdk-23+25"];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps set the branch value to master so that it is always available.
The currently given branch is no longer present.


await checkIfIndexingCompleted();
const endTime = Date.now() - startTime;
console.log("END_TIME: " + endTime);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps rename END_TIME to TIME_TAKEN.


const checkExtensionLoaded = (path: string): boolean => {
let d = languages.getDiagnostics(Uri.file(path));
return d.length != 0;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do add a comment on constants.OPENJDK_CHECK_FILES_RESOLVES that the files chosen must have some warnings or other diagnostic information/hints generated. Otherwise, this method would fail to detect that the extension loaded.

let d = languages.getDiagnostics(Uri.file(path));
const filterErrorsList = d.filter(el => el.severity == 0);
console.log("Filtered Errors List Length: " + filterErrorsList.length);
return filterErrorsList.length == 0;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps the return should check that there are some diagnostics available and then no errors are reported.

    return d.length > 0 && filterErrorsList.length == 0;

For the first file, this would be done by the separate invocation of checkExtensionLoaded and so it may not have any impact when there is only a single file in the check list.

@Achal1607 Achal1607 added the do not merge Don't merge PR label Aug 20, 2024
@Achal1607 Achal1607 deleted the branch oracle:testing October 23, 2024 06:16
@Achal1607 Achal1607 closed this Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do not merge Don't merge PR OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants