Gress
V2EX  ›  Java

求一个 JVM 客户端性能监控上报方案

  •  
  •   Gress · Feb 4, 2024 · 3933 views
    This topic created in 840 days ago, the information mentioned may be changed or developed.

    这段时间在开发 IDEA 的插件,但有客户说卡顿,看了下他电脑配置也不低,因此想搞一套客户端性能监控上报的,看看各个方法的执行时间,分析下卡顿在哪里。像 JProfiler/JMC 这些监控工具都得暴露一个端口并且主动连过去才能用,只适用于服务端监控,不适合客户端。请求下各位,客户端有啥好的性能监控方案吗?

    6 replies    2024-02-05 10:20:49 +08:00
    zjp
        1
    zjp  
       Feb 4, 2024
    可以 Profiler 工具生成离线文件再上传
    还有 IDEA 在 UI 线程停顿时有日志记录堆栈的
    rb6221
        2
    rb6221  
       Feb 4, 2024
    Android 这方面的东西很多,基本上就是字节码插桩统计方法耗时,你搞个 debug 模式开关,让用户自己打开,然后把运行后的统计结果发给你就行了
    Gress
        3
    Gress  
    OP
       Feb 4, 2024
    @janus77 有无相关资料看看?
    4kingRAS
        4
    4kingRAS  
       Feb 5, 2024
    micrometer + prometheus
    Blank10030
        5
    Blank10030  
       Feb 5, 2024
    prometheus
    imokkkk
        6
    imokkkk  
       Feb 5, 2024
    micrometer 埋点上传到 prometheus 不需要 prometheus 也可在 actuator 简单看下

    或者 OperatingSystemMXBean 这个类里的 API 定时采集一下数据上报处理(上报给 eureka 、日志、数据库等)
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   858 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 41ms · UTC 20:19 · PVG 04:19 · LAX 13:19 · JFK 16:19
    ♥ Do have faith in what you're doing.