美文网首页Java
接口吞吐量监控

接口吞吐量监控

作者: WANGGGGG | 来源:发表于2020-04-12 23:29 被阅读0次

拉格纳罗斯

一、特点

特点1

监控接口吞吐量

特点2

不需要侵入原先的代码逻辑

特点3

有个友好的交互界面直观的查看接口吞吐量

二、功能

<dependency>
      <groupId>com.github.wangcanfeng01</groupId>
      <artifactId>freedom-ragnaros</artifactId>
      <version>1.0.RELEASE</version>
</dependency>

功能1

我们可以重新自定义各个controller中的接口映射地址
所有实例的吞吐量接口
api.throughput.watch.all=/ui/throughput/watch
打开所有实例的吞吐量接口
api.throughput.open.all=/ui/throughput/open
关闭所有实例的吞吐量接口
api.throughput.close.all=/ui/throughput/close
单个实例的吞吐量接口
api.throughput.watch.single=/api/throughput/watch
打开单个实例的吞吐量接口
api.throughput.open.single=/api/throughput/open
关闭单个实例的吞吐量接口
api.throughput.close.single=/api/throughput/close

功能2

具体功能使用说明

@Component
@ThroughputScan
public class ExampleClass {

    @Throughput(name = "wcf.test")
    public String test() {
        try {
            TimeUnit.MILLISECONDS.sleep(30);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        return "started";
    }
}
@UseRagnaros
@Component
public class RagnarosConfiguration  implements WebMvcConfigurer {

    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        registry.addResourceHandler("/ragnaros.html")
                .addResourceLocations("classpath:/META-INF/resources/");
        registry.addResourceHandler("/webjars/**")
                .addResourceLocations("classpath:/META-INF/resources/webjars/");
    }
}

功能3

可以继承抽象类AbstractDistributedService实现部分接口,或者直接实现接口DistributedService,然后就可以获取其他实例的吞吐量信息

最后

ui.png

相关文章

  • 接口吞吐量监控

    拉格纳罗斯 一、特点 特点1 监控接口吞吐量 特点2 不需要侵入原先的代码逻辑 特点3 有个友好的交互界面直观的查...

  • 微服务架构(七)服务调用的监控

    服务调用的监控 监控的对象,指标,维度 监控的对象 客户端监控:功能的监控 接口的监控:接口调用情况的监控 资源监...

  • 步骤

    吞吐量 https://time.geekbang.org/column/article/87342 应用监控 应...

  • 数据格式

    首页1 接口1: 接口2: 首页2 接口1: 接口2: 监控页-服务器 接口1: 接口2: 筛选 监控详情 告警-...

  • 无标题文章

    文章目的 用脚本程序读取网络接口的吞吐量并用统计图形表示出于项目需要,要将linux系统中各个网络接口的吞吐量实时...

  • 深信服Sanfor NGAF-1000-A400性能问题

    官方标注的性能: 最大吞吐量: 三层吞吐量1.5G,应用层吞吐量200Mbps 固定接口: 4个电网口 并发连接数...

  • 接口监控

    一.数据要求及存储设计 接口表: 二.数据获取 1.人工配置 2.自动记录 三.监控 四.问题

  • 监控接口

  • WGCLOUD可以监控服务器上的业务软件运行的情况吗

    可以的 WGCLOUD有进程监控的功能,可以对进程应用进行监控,实时获取进程运行的cpu、内存、吞吐量等指标状态,如下图

  • 吞吐量、并发、TPS、QPS详解及对应公式计算

    吞吐量 一个系统的吞吐量(承压能力)需由 单个request对cpu的消耗、外部接口、IO等综合评定,单...

网友评论

    本文标题:接口吞吐量监控

    本文链接:https://www.haomeiwen.com/subject/qaaimhtx.html