Skip to content
This repository was archived by the owner on Nov 28, 2022. It is now read-only.

Commit bd7bd29

Browse files
committed
initial push of code
1 parent 191198d commit bd7bd29

40 files changed

Lines changed: 4101 additions & 1 deletion

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
out
2+
node_modules
3+
client/server
4+
.vscode-test
5+
**/.DS_Store

.vscode/launch.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// A launch configuration that compiles the extension and then opens it inside a new window
2+
{
3+
"version": "0.2.0",
4+
"configurations": [
5+
{
6+
"type": "extensionHost",
7+
"request": "launch",
8+
"name": "Launch Client",
9+
"runtimeExecutable": "${execPath}",
10+
"args": ["--extensionDevelopmentPath=${workspaceRoot}"],
11+
"outFiles": ["${workspaceRoot}/client/out/**/*.js"],
12+
"preLaunchTask": {
13+
"type": "npm",
14+
"script": "watch"
15+
}
16+
}
17+
]
18+
}

.vscode/settings.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"editor.insertSpaces": false,
3+
"tslint.enable": true,
4+
"typescript.tsc.autoDetect": "off",
5+
"typescript.preferences.quoteStyle": "single",
6+
"maven.view": "flat"
7+
}

.vscode/tasks.json

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"type": "npm",
6+
"script": "compile",
7+
"group": "build",
8+
"presentation": {
9+
"panel": "dedicated",
10+
"reveal": "never"
11+
},
12+
"problemMatcher": [
13+
"$tsc"
14+
]
15+
},
16+
{
17+
"type": "npm",
18+
"script": "watch",
19+
"isBackground": true,
20+
"group": {
21+
"kind": "build",
22+
"isDefault": true
23+
},
24+
"presentation": {
25+
"panel": "dedicated",
26+
"reveal": "never"
27+
},
28+
"problemMatcher": [
29+
"$tsc-watch"
30+
]
31+
}
32+
]
33+
}

.vscodeignore

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
.vscode/**
2+
**/*.ts
3+
**/*.map
4+
.gitignore
5+
**/tsconfig.json
6+
**/tsconfig.base.json
7+
contributing.md
8+
.travis.yml
9+
client/node_modules/**
10+
!client/node_modules/vscode-jsonrpc/**
11+
!client/node_modules/vscode-languageclient/**
12+
!client/node_modules/vscode-languageserver-protocol/**
13+
!client/node_modules/vscode-languageserver-types/**
14+
15+
# Compiled class file
16+
*.class
17+
18+
# Log file
19+
*.log
20+
21+
# BlueJ files
22+
*.ctxt
23+
24+
# Mobile Tools for Java (J2ME)
25+
.mtj.tmp/
26+
27+
# Package Files #
28+
*.jar
29+
*.war
30+
*.nar
31+
*.ear
32+
*.zip
33+
*.tar.gz
34+
*.rar
35+
36+
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
37+
hs_err_pid*

CONTRIBUTING.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Contributing
2+
3+
## Running the Extension
4+
5+
With Visual Studio Code:
6+
7+
- Clone this repository locally.
8+
- Run `npm install` in the cloned `codewind-java-profiler` folder. This installs all necessary npm modules in the client directory.
9+
- Open the clone of this repository in Visual Studio Code.
10+
- Press Ctrl+Shift+B (Cmd+Shift+B on Mac) to compile the client.
11+
- Switch to the Debug viewlet.
12+
- Select `Launch Client` from the drop down and press the Run icon.
13+
14+
## Testing
15+
16+
### Integration Tests
17+
18+
To be added
19+
20+
### Server Tests
21+
22+
Unit tests for the Java Server are in the `server/src/test` directory. These are JUnit unit tests, but can only be run inside the server Docker container.
23+
24+
To run the container complete the following steps:
25+
26+
- Run `docker build -t java-ls .` in the `server` directory.
27+
- Run `docker run -it java-ls bash`.
28+
- In the `/profiling` directory, run `mvn test`.
29+
- You will see a summary of all tests run.
30+
31+
## Building/Installing the Extension
32+
33+
To build a `.vsix` extension package that can then be installed/published:
34+
35+
- Run `npm install` in the `codewind-java-profiler` folder.
36+
- Install the `vsce` package globally with `npm install -g vsce`.
37+
- Run `vsce package` in the `codewind-java-profiler` folder.
38+
- A `.vsix` file will then be generated.
39+
40+
To install the extension:
41+
42+
- Run `code --install-extension <name of generated vsix file>` in the `codewind-java-profiler` folder.
43+
- Restart Visual Studio Code.
44+
- The extension should appear in your list of installed extensions.
45+
46+
For more information refer to: <https://code.visualstudio.com/api/working-with-extensions/publishing-extension>

README.md

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,28 @@
1-
# codewind-java-profiler
1+
# Codewind Java Profiler
2+
3+
Annotates your Java code with code highlighting for your hottest methods in your Codewind projects.
4+
5+
![platforms](https://img.shields.io/badge/runtime-Java-yellow.svg)
6+
[![Eclipse License](https://img.shields.io/badge/license-Eclipse-brightgreen.svg)](https://github.com/eclipse/codewind-java-profiler/blob/master/LICENSE)
7+
8+
This extension provides code highlighting showing relative time spent in Java methods based on profiling data gathered through Codewind Load Testing.
9+
10+
## Usage
11+
12+
With Visual Studio Code:
13+
14+
- Open .
15+
- This will create profiling data in a `load-test/[timestamp]/xxxx.hcd` file in your Codewind project.
16+
- In Visual Studio Code open a Java file in your project.
17+
- The extension will highlight any methods which were found in the profiling data and annotate them to show the percentage of time they were running on the CPU during profiling.
18+
19+
## Contributing
20+
21+
We welcome submitting issues and contributions.
22+
23+
1. [Submitting bugs](https://github.com/eclipse/codewind-java-profiler/issues)
24+
2. [Contributing](CONTRIBUTING.md)
25+
26+
## License
27+
28+
[EPL 2.0](https://github.com/eclipse/codewind-java-profiler/blob/master/LICENSE)

0 commit comments

Comments
 (0)