MCPcopy Index your code
hub / github.com/ammbra/performance-glance

github.com/ammbra/performance-glance @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
51 symbols 99 edges 14 files 1 documented · 2%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

perfomance-glance

How to find out the modules needed by jlink

Uncomment the maven-dependency-plugin plugin in pom.xml:

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <version>${maven.dependency.plugin.version}</version>
                <executions>
                    <execution>
                        <id>copy-dependencies</id>
                        <phase>package</phase>
                        <goals>
                            <goal>copy-dependencies</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${project.build.directory}/libs</outputDirectory>
                            <overWriteReleases>false</overWriteReleases>
                            <overWriteSnapshots>false</overWriteSnapshots>
                            <overWriteIfNewer>true</overWriteIfNewer>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

Then run the following commands in a terminal window:

mvn verify
jdeps --ignore-missing-deps -q -recursive --multi-release 21 \
  --print-module-deps --class-path 'target/libs/*' target/spring-todo-app.jar

How to start the setup

Place yourself in the root directory and run :

docker-compose up --build

You can access the following endpoints:

Application Local Endpoint
Todo App http://localhost:8080
Prometheus http://localhost:9090
Grafana http://localhost:300

Now create some requests by running:

sh scripts/load.sh

How to detect missing JVM NativeMemoryTracking flag

Please take a look at /scripts/flag.sh and:

sh scripts/flag.sh

How to track Native Memory Used

Run

sh scripts/track.sh

How to query stats

Run

sh scripts/query.sh

Prometheus

Look at CPU Load Machine Total vs HTTP server requests

rate(jdk_CPULoadmachineTotal[1m]) 
or rate(http_server_requests_seconds_sum{method="POST", uri="/api/todo"}[1m]) 
or rate(http_server_requests_seconds_sum{method="GET", uri="/api/todo"}[1m]) 
or rate(http_server_requests_seconds_sum{method="PUT", uri="/api/todo"}[1m])
or rate(http_server_requests_seconds_sum{method="DELETE"}[1m]) 

Look at Garbage Collection Longest Pause vs HTTP server requests

rate(jdk_GarbageCollectionlongestPause[1m]) 
or rate(http_server_requests_seconds_sum{method="POST", uri="/api/todo"}[1m]) 
or rate(http_server_requests_seconds_sum{method="GET", uri="/api/todo"}[1m]) 
or rate(http_server_requests_seconds_sum{method="PUT", uri="/api/todo"}[1m])
or rate(http_server_requests_seconds_sum{method="DELETE"}[1m]) 

Look at Garbage Collection Sum of Pauses vs HTTP server requests

rate(jdk_GarbageCollectionsumOfPauses[1m]) 
or rate(http_server_requests_seconds_sum{method="POST", uri="/api/todo"}[1m]) 
or rate(http_server_requests_seconds_sum{method="GET", uri="/api/todo"}[1m]) 
or rate(http_server_requests_seconds_sum{method="PUT", uri="/api/todo"}[1m])
or rate(http_server_requests_seconds_sum{method="DELETE"}[1m]) 

Look at GCHeapSummary Heap Used

rate(jdk_GCHeapSummaryheapUsed[1m]) 
or rate(http_server_requests_seconds_sum{method="POST", uri="/api/todo"}[1m]) 
or rate(http_server_requests_seconds_sum{method="GET", uri="/api/todo"}[1m]) 
or rate(http_server_requests_seconds_sum{method="PUT", uri="/api/todo"}[1m])
or rate(http_server_requests_seconds_sum{method="DELETE"}[1m]) 

Extension points exported contracts — how you extend this code

TodoRepository (Interface)
(no doc)
src/main/java/org/acme/example/repository/TodoRepository.java

Core symbols most depended-on inside this repo

getId
called by 9
src/main/java/org/acme/example/model/Todo.java
getContent
called by 4
src/main/java/org/acme/example/model/Todo.java
toString
called by 4
src/main/java/org/acme/example/model/Todo.java
getOwner
called by 3
src/main/java/org/acme/example/model/Todo.java
getOwner
called by 1
src/main/resources/static/js/controller.js
extractJDKGCToGauge
called by 1
src/main/java/org/acme/example/ApplicationStartup.java
extractJDKCpuLoadToGauge
called by 1
src/main/java/org/acme/example/ApplicationStartup.java
matches
called by 1
src/main/java/org/acme/example/jfr/PathProcessorControl.java

Shape

Method 39
Class 10
Function 1
Interface 1

Languages

Java98%
TypeScript2%

Modules by API surface

src/main/java/org/acme/example/model/Todo.java13 symbols
src/test/java/org/acme/example/TodoApplicationTest.java6 symbols
src/main/java/org/acme/example/controller/TodoController.java6 symbols
src/main/java/org/acme/example/jfr/PathProcessorControl.java5 symbols
src/main/java/org/acme/example/jfr/FlightRecorderFilter.java4 symbols
src/main/java/org/acme/example/jfr/CustomMetricsListener.java4 symbols
src/main/java/org/acme/example/ApplicationStartup.java4 symbols
src/main/java/org/acme/example/jfr/JFRConfig.java3 symbols
src/main/java/org/acme/example/jfr/RestEndpointInvocationEvent.java2 symbols
src/main/java/org/acme/example/TodoApplication.java2 symbols
src/main/resources/static/js/controller.js1 symbols
src/main/java/org/acme/example/repository/TodoRepository.java1 symbols

For agents

$ claude mcp add performance-glance \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page