小编bri*_*zil的帖子

解密golang垃圾收集输出

我正在运行一个示例程序程序

rahul@g3ck0:~/programs/Remodel$ GOGCTRACE=1 go run main.go 
gc1(1): 0+0+0 ms 0 -> 0 MB 422 -> 346 (422-76) objects 0 handoff
gc2(1): 0+0+0 ms 0 -> 0 MB 2791 -> 1664 (2867-1203) objects 0 handoff
gc3(1): 0+0+0 ms 1 -> 0 MB 4576 -> 2632 (5779-3147) objects 0 handoff
gc4(1): 0+0+0 ms 1 -> 0 MB 3380 -> 2771 (6527-3756) objects 0 handoff
gc5(1): 0+0+0 ms 1 -> 0 MB 3511 -> 2915 (7267-4352) objects 0 handoff
gc6(1): 0+0+0 ms 1 …
Run Code Online (Sandbox Code Playgroud)

garbage-collection go

5
推荐指数
2
解决办法
3103
查看次数

标签与正则表达式 - 普罗米修斯

我正在尝试使用正则表达式添加新标签.名称实例是pr-na01-na02-A 我试图只获取pr-na01,所以我这样做:

  - source_labels: ['__meta_ec2_tag_Name']
    regex: '^[^-]*-[^-]*'
    target_label: 'test'
    replacement: '$1'
Run Code Online (Sandbox Code Playgroud)

仍然没有在Prometheus指标下看到新标签(测试).

prometheus

3
推荐指数
1
解决办法
4445
查看次数

标签 统计

garbage-collection ×1

go ×1

prometheus ×1