A sophisticated desktop application that analyzes Java code performance metrics, including execution time and Memory usage. Features automated test data generation with customizable input sizes up to 100,000 elements, eliminating the need for manual test data creation.
- Overview
- Main User Interface
- Input Types
- Graphs and Visualizations
- Data Display
- User Manual
- Installation
- Usage
The Java Code Performance Analyzer Tool uses Java and JavaFX to evaluate code efficiency. It generates performance graphs from various input types and displays key metrics such as execution time and memory usage.
The main UI features:
- Code Input Panel: Paste or write code to be analyzed.
- Input Options: Select input type and adjust parameters.
- Results Panel: View performance metrics including execution time, memory usage, time and space complexity.
- Graph Buttons: Launch dedicated graph windows for further analysis.
The tool provides several input methods:
Provide a single dataset to test your program quickly.
Specify a range with:
- Minimum Input Size
- Maximum Input Size
- Step Size
Enter custom test cases directly.
Generate random test data automatically based on your configuration.
Uses predefined test data embedded in the code for consistent benchmarking.
Visualizations help you interpret performance trends:
Displays the program's execution time across different input sizes.
Visualizes the memory usage trend.
A summary view of execution time and memory usage.
View the test data used for analysis in a dedicated window.
Review your program's output after analysis.
Detailed usage instructions and guidelines can be found in the integrated user manual. The manual explains:
- Expected input format
- Main method requirements
- Performance analysis techniques
- Best practices for accurate results
-
Clone the Repository:
git clone https://github.com/neeraj1240/JavaCodePerformanceAnalyzer.git
-
Navigate to the Project Directory:
cd JavaCodePerformanceAnalyzer
-
Build the Project:
If using Maven (as indicated by the
pom.xml
file), run:mvn clean install
-
Run the Application:
If you are using the command line:
java -cp target/your-artifact.jar main.ui.CodeAnalyzerUI
Alternatively, you can run the application from within your IDE (e.g., Visual Studio Code).
-
Enter Code:
- Use the left panel to type or paste your Java code.
-
Select Input Type:
- Choose from Single, Range, Manual, Random, or Hardcoded inputs.
-
Start Analysis:
- Click "Analyze" to run the performance metrics.
-
View Graphs and Results:
- Use "Show Time Graph" and "Show Memory Graph" buttons to view detailed visualizations.
- Review the numeric results displayed alongside the graphs.
-
Use the User Manual:
- Access the user manual directly from the UI for further guidance.