简体   繁体   English

您如何在资源有限的情况下衡量 spring 启动 api 的性能?

[英]How do you measure performance of spring boot api with limited resources?

Let's say we have a monolithic rest API written in Java with Spring Boot.假设我们有一个单片 rest API 写在 Java 和 Spring Boot. And we want to do some performance analysis on it, how would we go about it?而我们想对它做一些性能分析,我们怎么会go呢?

The problem is measuring its performance with custom maximum usage requirements, for example, maximum ram, CPU cores, CPU clock speed, etc.问题是通过自定义最大使用要求来衡量其性能,例如最大内存、CPU 内核、CPU 时钟速度等。

Knowing this can be useful, such as predicting cloud and other hosting fees, what is the best way of doing it?知道这一点很有用,例如预测云和其他托管费用,最好的方法是什么?

Maybe you can use Spring metrics and tracing?也许您可以使用 Spring 指标和跟踪? https://spring.io/guides/tutorials/metrics-and-tracing/ https://spring.io/guides/tutorials/metrics-and-tracing/

Also might wanna look at Grafana k6也可能想看看 Grafana k6

https://circleci.com/blog/api-performance-testing-with-k6/ https://circleci.com/blog/api-performance-testing-with-k6/

and Micrometer和千分尺

https://micrometer.io/ https://micrometer.io/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何将MySQL连接到Spring Boot? - How do you connect MySQL to Spring Boot? 您在哪里/如何在Spring Boot应用程序中存储应用程序密钥(密码,API KEY) - Where/how do you store application secrets(password, API KEY) in Spring Boot application 如何测量从线程池线程调用 api 的响应时间。(java spring 引导) - How to measure response time of an api when it is being called from threadpool thread.( java spring boot) 运行 Spring Boot fat-jar 时如何覆盖 Java 资源? - How to override Java resources when you run Spring Boot fat-jar? 如何在Spring Boot中创建JDBC TokenStore? - How do you create JDBC TokenStore in Spring Boot? 如何在Spring Boot中启用hibernate.generate_statistics? - How do you enable hibernate.generate_statistics with Spring Boot? 如何配置 spring boot 2 默认返回 xml? - How do you configure spring boot 2 to return xml by default? 你如何在 spring boot 3 中忽略 webflux 中的尾部斜杠? - How do you ignore trailing slash in webflux in spring boot 3? 您如何在 Spring Boot 2 和 Angular 中设置找不到页面 - How do you setup not found page in Spring Boot 2 and Angular 如何在Spring Boot应用程序中模拟外部依赖关系? - How do you mock external dependencies in spring boot application?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM