GithubHelp home page GithubHelp logo

xuguozong / performance-glance Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ammbra/performance-glance

0.0 1.0 0.0 61 KB

Repository containing simple springboot todo app with JFR, prometheus and grafana enabled

License: MIT License

Shell 10.13% JavaScript 10.62% Java 66.88% HTML 9.60% Dockerfile 2.77%

performance-glance's Introduction

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 20 \
  --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]) 

performance-glance's People

Contributors

ammbra avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.