gRPC内置trace
发表于|更新于|Go
|总字数:64|阅读时长:1分钟|浏览量:
1 | func main() { |
- 通过
http://localhost:9503/debug/requests查看请求 - 通过
http://localhost:9503/debug/events查看事件
文章作者: Estom
文章链接: https://estom.github.io/2021/09/02/Go/5%20GoWeb%E5%BC%80%E5%8F%91/grpc/gRPC%E5%86%85%E7%BD%AEtrace/
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 Estom的博客!
相关推荐

2020-09-26
looking_glass
镜子例如,使用鼠标事件模拟用于检查数据的镜子。 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152import numpy as npimport matplotlib.pyplot as pltimport matplotlib.patches as patches# Fixing random state for reproducibilitynp.random.seed(19680801)x, y = np.random.rand(2, 200)fig, ax = plt.subplots()circ = patches.Circle((0.5, 0.5), 0.25, alpha=0.8, fc='yellow')ax.add_patch(circ)ax.plot(x, y, alpha=0.2)line, = ax.plot(x, y, alpha=1.0, clip_path=circ)ax.set_titl...

2020-09-26
rectangle_selector
矩形选择器在某处鼠标点击,将鼠标移动到某个目的地,然后释放按钮。 此类提供单击和释放事件,并从点击点到实际鼠标位置(在相同轴内)绘制一条线或一个框,直到释放按钮。 在方法’self.ignore()’中,检查来自eventpress和eventrelease的按钮是否相同。 输出: 1click --> release 123456789101112131415161718192021222324252627282930313233343536373839404142from matplotlib.widgets import RectangleSelectorimport numpy as npimport matplotlib.pyplot as pltdef line_select_callback(eclick, erelease): 'eclick and erelease are the press and release events' x1, y1 = eclick.xdata, eclick.ydata x2,...

2020-09-26
keypress_demo
按键演示显示如何连接到按键事件 12345678910111213141516171819202122232425import sysimport numpy as npimport matplotlib.pyplot as pltdef press(event): print('press', event.key) sys.stdout.flush() if event.key == 'x': visible = xl.get_visible() xl.set_visible(not visible) fig.canvas.draw()# Fixing random state for reproducibilitynp.random.seed(19680801)fig, ax = plt.subplots()fig.canvas.mpl_connect('key_press_event', press)ax.plot(np.random.rand(12),...

2020-09-26
pick_event_demo
选择事件演示您可以通过设置艺术家的“选择器”属性来启用拾取(例如,matplotlib Line2D,Text,Patch,Polygon,AxesImage等…) 选择器属性有多种含义 None - 此艺术家对象的选择功能已停用(默认) boolean - 如果为True,则启用拾取,如果鼠标事件在艺术家上方,艺术家将触发拾取事件 float - 如果选择器是一个数字,则它被解释为以点为单位的epsilon容差,如果事件的数据在鼠标事件的epsilon内,则艺术家将触发事件。 对于某些艺术家(如线条和补丁集合),艺术家可能会为生成的挑选事件提供其他数据,例如,挑选事件的epsilon中的数据索引 function - 如果选择器是可调用的,则它是用户提供的函数,用于确定艺术家是否被鼠标事件命中。 hit, props = picker(artist, mouseevent) 确定命中测试。 如果鼠标事件在艺术家上方,则返回hit = True,props是要添加到PickEvent属性的属性字典 通过设置“选取器”属性启用艺术家进行拾取后...

2020-09-26
coords_demo
Coords 演示如何通过连接到移动和单击事件来与绘图画布交互的示例 1234567891011121314151617181920212223242526272829303132333435import sysimport matplotlib.pyplot as pltimport numpy as npt = np.arange(0.0, 1.0, 0.01)s = np.sin(2 * np.pi * t)fig, ax = plt.subplots()ax.plot(t, s)def on_move(event): # get the x and y pixel coords x, y = event.x, event.y if event.inaxes: ax = event.inaxes # the axes instance print('data coords %f %f' % (event.xdata, event.ydata))def on_click(event): # get t...

2022-11-01
6 JobListener
Listeners是您创建的对象,用于根据调度程序中发生的事件执行操作。您可能猜到,TriggerListeners接收到与触发器(trigger)相关的事件,JobListeners 接收与jobs相关的事件。 与触发相关的事件包括:触发器触发,触发失灵(在本文档的“触发器”部分中讨论),并触发完成(触发器关闭的作业完成)。 org.quartz.TriggerListener接口 public interface TriggerListener { public String getName(); public void triggerFired(Trigger trigger, JobExecutionContext context); public boolean vetoJobExecution(Trigger trigger, JobExecutionContext context); public void triggerMisfired(Trigger trigger); public void triggerComplete(Trigger trigge...
公告
欢迎参观Estom的小屋




