Git Product home page Git Product logo

database-response-time-measure's Introduction

Introduction

Purpose of this DBClient is to isolate whether DB becoming a performance bottleneck in production deployment. (It's not possible to enable JDBC spy logs in production systems, since it need some config file changes and server restarts)

What this client do is, execute a given SQL query for given number of iterations, and log the query execution time taken in each iteration.

This client will help to identify scenarios such as;

  • Database itself has some tuning/network issues. eg: You see high fluctuation in the query execution times
  • Database query execution time is too high. eg: Number of records in the Db has grown. Not having proper indexes etc.

Note: You need to have idea on the issue that you are going to isolate and define the SQL query as relevant for that. eg: Token generation, Registry, JDBC user store issues need to pick the query as relevant for each.

How to build ?

  1. Checkout the source and execute following command from the project home folder (database-response-time-measure) mvn clean install

  2. Build jar will available in project target directory, once build is success.

How to execute the client ?

  1. Copy the built jar file "db.response.time.measure-1.0.jar" and "config.properties" file into a same directory location.

  2. Update the config.properties file with correct db details.

  3. Execute following command to run the client and get query execution times.
    java -jar db.response.time.measure-1.0.jar

  4. On a successful execution of client, you will see result similar to following.


                          Connected to database and query execution started

Query Executed
Time taken to execute query : 38ms.
Query Executed
Time taken to execute query : 98ms.
Query Executed
Time taken to execute query : 98ms.
Query Executed
Time taken to execute query : 42ms.
Query Executed
Time taken to execute query : 38ms.


                   Avarage time taken to execute query : 62.8ms.

database-response-time-measure's People

Contributors

dinusha-dilrukshi avatar shagihan 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.