GithubHelp home page GithubHelp logo

resttest's Introduction

Bench Rest Test

Requirements:

How to run:

To run the project, run the following commands:

$ mvn spring-boot:run

OR

$ mvn clean install
$ java -jar target/resttest-0.0.1-SNAPSHOT.jar

Personal Notes

Scalability

Considering scalability for this project, there are two levels of performance improvements that I would consider based on the dataset's size:

  • Job takes more than 1 second to run:

    • Monitor: performance logs in the code;
    • Solution: add parallelism to the method FinancialTransactionsService:getFinancialTransactionsDailyBalance on the do-while call;
    • Required changes: Change the pagination variables to AtomicIntegers, add a CountDownLatch to wait for all the threads to run and add tests to validate that the logic is thread-safe.
  • Server's memory usage surpasses 50%:

    • Monitor: keep track of the memory usage history and add an alert in case the threshold is greater than 50%
    • Solution: add a sql database to the solution, save all the calls as they come (instead of saving in memory the results) and query the results by day (from old to new) to calculate the balance;
    • Required changes: add a DB to the infrastructure, add the domain and repository layers to the project, architect the db schema and add and modify tests to validate the new logic and layers.

Test coverage summary

Total:

  • 100% classes covered
  • 64% line covered

Service:

  • 92% line covered

Util:

  • 83% line covered

Provider:

  • 8% lines covered

resttest's People

Contributors

wilson-kis avatar wilson-martins 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.