drbuowqe02101 2018-01-05 15:33
浏览 328
已采纳

Golang程序的配置文件中的runtime.kevent是什么?

I am profiling a program where the vast majority (86%) of time is spent in two runtime functions: kevent and selectgo. I understand the select, but I don't know what kevent is (so I don't know where to start optimizing):

Showing top 10 nodes out of 33
      flat  flat%   sum%        cum   cum%
   114.63s 65.79% 65.79%    114.63s 65.79%  runtime.kevent /usr/local/Cellar/go/1.9.2/libexec/src/runtime/sys_darwin_amd64.s
    19.26s 11.05% 76.85%     35.90s 20.60%  runtime.selectgo /usr/local/Cellar/go/1.9.2/libexec/src/runtime/select.go
  • 写回答

1条回答 默认 最新

  • dongxian4531 2018-01-05 15:42
    关注

    It's the network poller. There are multiple implementations:

    You're seeing kevent due to being on Darwin. Basically, this is time spent waiting for I/O.

    Note that it's called netpoll, but it applies to file descriptors in general, so it may be network communication but it could just as well be file I/O.

    Here are more details about kqueue and epoll.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 有了解d3和topogram.js库的吗?有偿请教
  • ¥100 任意维数的K均值聚类
  • ¥15 stamps做sbas-insar,时序沉降图怎么画
  • ¥15 unity第一人称射击小游戏,有demo,在原脚本的基础上进行修改以达到要求
  • ¥15 买了个传感器,根据商家发的代码和步骤使用但是代码报错了不会改,有没有人可以看看
  • ¥15 关于#Java#的问题,如何解决?
  • ¥15 加热介质是液体,换热器壳侧导热系数和总的导热系数怎么算
  • ¥100 嵌入式系统基于PIC16F882和热敏电阻的数字温度计
  • ¥15 cmd cl 0x000007b
  • ¥20 BAPI_PR_CHANGE how to add account assignment information for service line