Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/sync: add p8s metrics for sync command #4119

Merged
merged 8 commits into from
Oct 25, 2023
Merged

Conversation

zhijian-pro
Copy link
Contributor

@zhijian-pro zhijian-pro commented Oct 24, 2023

depend on juicedata/mpb#2
close #4109

p8s http://127.0.0.1:9567/metrics

# HELP juicefs_sync_checked Checked objects
# TYPE juicefs_sync_checked counter
juicefs_sync_checked{cmd="sync",pid="18939"} 1008
# HELP juicefs_sync_checked_bytes Checked bytes
# TYPE juicefs_sync_checked_bytes counter
juicefs_sync_checked_bytes{cmd="sync",pid="18939"} 3.262846983e+09
# HELP juicefs_sync_copied Copied objects
# TYPE juicefs_sync_copied counter
juicefs_sync_copied{cmd="sync",pid="18939"} 0
# HELP juicefs_sync_copied_bytes Copied bytes
# TYPE juicefs_sync_copied_bytes counter
juicefs_sync_copied_bytes{cmd="sync",pid="18939"} 0
# HELP juicefs_sync_cpu_usage Accumulated CPU usage in seconds.
# TYPE juicefs_sync_cpu_usage gauge
juicefs_sync_cpu_usage{cmd="sync",pid="18939"} 10.618006000000001
# HELP juicefs_sync_failed Failed objects
# TYPE juicefs_sync_failed counter
juicefs_sync_failed{cmd="sync",pid="18939"} 0
# HELP juicefs_sync_go_build_info Build information about the main Go module.
# TYPE juicefs_sync_go_build_info gauge
juicefs_sync_go_build_info{checksum="",cmd="sync",path="github.com/juicedata/juicefs",pid="18939",version="(devel)"} 1
# HELP juicefs_sync_go_gc_duration_seconds A summary of the pause duration of garbage collection cycles.
# TYPE juicefs_sync_go_gc_duration_seconds summary
juicefs_sync_go_gc_duration_seconds{cmd="sync",pid="18939",quantile="0"} 7.6753e-05
juicefs_sync_go_gc_duration_seconds{cmd="sync",pid="18939",quantile="0.25"} 7.9967e-05
juicefs_sync_go_gc_duration_seconds{cmd="sync",pid="18939",quantile="0.5"} 0.000196007
juicefs_sync_go_gc_duration_seconds{cmd="sync",pid="18939",quantile="0.75"} 0.000198748
juicefs_sync_go_gc_duration_seconds{cmd="sync",pid="18939",quantile="1"} 0.000198748
juicefs_sync_go_gc_duration_seconds_sum{cmd="sync",pid="18939"} 0.000551475
juicefs_sync_go_gc_duration_seconds_count{cmd="sync",pid="18939"} 4
# HELP juicefs_sync_go_goroutines Number of goroutines that currently exist.
# TYPE juicefs_sync_go_goroutines gauge
juicefs_sync_go_goroutines{cmd="sync",pid="18939"} 471
# HELP juicefs_sync_go_info Information about the Go environment.
# TYPE juicefs_sync_go_info gauge
juicefs_sync_go_info{cmd="sync",pid="18939",version="go1.20.4"} 1
# HELP juicefs_sync_go_memstats_alloc_bytes Number of bytes allocated and still in use.
# TYPE juicefs_sync_go_memstats_alloc_bytes gauge
juicefs_sync_go_memstats_alloc_bytes{cmd="sync",pid="18939"} 3.3811224e+07
# HELP juicefs_sync_go_memstats_alloc_bytes_total Total number of bytes allocated, even if freed.
# TYPE juicefs_sync_go_memstats_alloc_bytes_total counter
juicefs_sync_go_memstats_alloc_bytes_total{cmd="sync",pid="18939"} 4.4856216e+07
# HELP juicefs_sync_go_memstats_buck_hash_sys_bytes Number of bytes used by the profiling bucket hash table.
# TYPE juicefs_sync_go_memstats_buck_hash_sys_bytes gauge
juicefs_sync_go_memstats_buck_hash_sys_bytes{cmd="sync",pid="18939"} 1.45887e+06
# HELP juicefs_sync_go_memstats_frees_total Total number of frees.
# TYPE juicefs_sync_go_memstats_frees_total counter
juicefs_sync_go_memstats_frees_total{cmd="sync",pid="18939"} 96504
# HELP juicefs_sync_go_memstats_gc_sys_bytes Number of bytes used for garbage collection system metadata.
# TYPE juicefs_sync_go_memstats_gc_sys_bytes gauge
juicefs_sync_go_memstats_gc_sys_bytes{cmd="sync",pid="18939"} 8.838168e+06
# HELP juicefs_sync_go_memstats_heap_alloc_bytes Number of heap bytes allocated and still in use.
# TYPE juicefs_sync_go_memstats_heap_alloc_bytes gauge
juicefs_sync_go_memstats_heap_alloc_bytes{cmd="sync",pid="18939"} 3.3811224e+07
# HELP juicefs_sync_go_memstats_heap_idle_bytes Number of heap bytes waiting to be used.
# TYPE juicefs_sync_go_memstats_heap_idle_bytes gauge
juicefs_sync_go_memstats_heap_idle_bytes{cmd="sync",pid="18939"} 7.102464e+06
# HELP juicefs_sync_go_memstats_heap_inuse_bytes Number of heap bytes that are in use.
# TYPE juicefs_sync_go_memstats_heap_inuse_bytes gauge
juicefs_sync_go_memstats_heap_inuse_bytes{cmd="sync",pid="18939"} 4.03456e+07
# HELP juicefs_sync_go_memstats_heap_objects Number of allocated objects.
# TYPE juicefs_sync_go_memstats_heap_objects gauge
juicefs_sync_go_memstats_heap_objects{cmd="sync",pid="18939"} 152836
# HELP juicefs_sync_go_memstats_heap_released_bytes Number of heap bytes released to OS.
# TYPE juicefs_sync_go_memstats_heap_released_bytes gauge
juicefs_sync_go_memstats_heap_released_bytes{cmd="sync",pid="18939"} 6.955008e+06
# HELP juicefs_sync_go_memstats_heap_sys_bytes Number of heap bytes obtained from system.
# TYPE juicefs_sync_go_memstats_heap_sys_bytes gauge
juicefs_sync_go_memstats_heap_sys_bytes{cmd="sync",pid="18939"} 4.7448064e+07
# HELP juicefs_sync_go_memstats_last_gc_time_seconds Number of seconds since 1970 of last garbage collection.
# TYPE juicefs_sync_go_memstats_last_gc_time_seconds gauge
juicefs_sync_go_memstats_last_gc_time_seconds{cmd="sync",pid="18939"} 1.698203361252099e+09
# HELP juicefs_sync_go_memstats_lookups_total Total number of pointer lookups.
# TYPE juicefs_sync_go_memstats_lookups_total counter
juicefs_sync_go_memstats_lookups_total{cmd="sync",pid="18939"} 0
# HELP juicefs_sync_go_memstats_mallocs_total Total number of mallocs.
# TYPE juicefs_sync_go_memstats_mallocs_total counter
juicefs_sync_go_memstats_mallocs_total{cmd="sync",pid="18939"} 249340
# HELP juicefs_sync_go_memstats_mcache_inuse_bytes Number of bytes in use by mcache structures.
# TYPE juicefs_sync_go_memstats_mcache_inuse_bytes gauge
juicefs_sync_go_memstats_mcache_inuse_bytes{cmd="sync",pid="18939"} 19200
# HELP juicefs_sync_go_memstats_mcache_sys_bytes Number of bytes used for mcache structures obtained from system.
# TYPE juicefs_sync_go_memstats_mcache_sys_bytes gauge
juicefs_sync_go_memstats_mcache_sys_bytes{cmd="sync",pid="18939"} 31200
# HELP juicefs_sync_go_memstats_mspan_inuse_bytes Number of bytes in use by mspan structures.
# TYPE juicefs_sync_go_memstats_mspan_inuse_bytes gauge
juicefs_sync_go_memstats_mspan_inuse_bytes{cmd="sync",pid="18939"} 484480
# HELP juicefs_sync_go_memstats_mspan_sys_bytes Number of bytes used for mspan structures obtained from system.
# TYPE juicefs_sync_go_memstats_mspan_sys_bytes gauge
juicefs_sync_go_memstats_mspan_sys_bytes{cmd="sync",pid="18939"} 489600
# HELP juicefs_sync_go_memstats_next_gc_bytes Number of heap bytes when next garbage collection will take place.
# TYPE juicefs_sync_go_memstats_next_gc_bytes gauge
juicefs_sync_go_memstats_next_gc_bytes{cmd="sync",pid="18939"} 5.4950072e+07
# HELP juicefs_sync_go_memstats_other_sys_bytes Number of bytes used for other system allocations.
# TYPE juicefs_sync_go_memstats_other_sys_bytes gauge
juicefs_sync_go_memstats_other_sys_bytes{cmd="sync",pid="18939"} 3.466202e+06
# HELP juicefs_sync_go_memstats_stack_inuse_bytes Number of bytes in use by the stack allocator.
# TYPE juicefs_sync_go_memstats_stack_inuse_bytes gauge
juicefs_sync_go_memstats_stack_inuse_bytes{cmd="sync",pid="18939"} 7.077888e+06
# HELP juicefs_sync_go_memstats_stack_sys_bytes Number of bytes obtained from system for stack allocator.
# TYPE juicefs_sync_go_memstats_stack_sys_bytes gauge
juicefs_sync_go_memstats_stack_sys_bytes{cmd="sync",pid="18939"} 7.077888e+06
# HELP juicefs_sync_go_memstats_sys_bytes Number of bytes obtained from system.
# TYPE juicefs_sync_go_memstats_sys_bytes gauge
juicefs_sync_go_memstats_sys_bytes{cmd="sync",pid="18939"} 6.8809992e+07
# HELP juicefs_sync_go_threads Number of OS threads created.
# TYPE juicefs_sync_go_threads gauge
juicefs_sync_go_threads{cmd="sync",pid="18939"} 32
# HELP juicefs_sync_handled Handled objects
# TYPE juicefs_sync_handled counter
juicefs_sync_handled{cmd="sync",pid="18939"} 1008
# HELP juicefs_sync_memory Used memory in bytes.
# TYPE juicefs_sync_memory gauge
juicefs_sync_memory{cmd="sync",pid="18939"} 7.2474624e+07
# HELP juicefs_sync_pending Pending objects
# TYPE juicefs_sync_pending gauge
juicefs_sync_pending{cmd="sync",pid="18939"} 6324
# HELP juicefs_sync_scanned Scanned objects
# TYPE juicefs_sync_scanned counter
juicefs_sync_scanned{cmd="sync",pid="18939"} 7342
# HELP juicefs_sync_skipped Skipped objects
# TYPE juicefs_sync_skipped counter
juicefs_sync_skipped{cmd="sync",pid="18939"} 1008
# HELP juicefs_sync_uptime Total running time in seconds.
# TYPE juicefs_sync_uptime gauge
juicefs_sync_uptime{cmd="sync",pid="18939"} 6.133265119

consul
image
image

@zhijian-pro zhijian-pro marked this pull request as ready for review October 24, 2023 05:28
cmd/sync.go Outdated Show resolved Hide resolved
@zhijian-pro zhijian-pro marked this pull request as draft October 24, 2023 09:05
@zhijian-pro zhijian-pro marked this pull request as ready for review October 25, 2023 02:54
@zhijian-pro zhijian-pro marked this pull request as draft October 25, 2023 03:05
@zhijian-pro zhijian-pro marked this pull request as ready for review October 25, 2023 03:07
@github-actions
Copy link

Mutate Test Report
cmd/mount_test.go-4-4: score:1.00 failed:0, passed:18, compile error:0, out of coverage:0, skip by comment:0, others:41
Job detail: https://github.com/juicedata/juicefs/actions/runs/6635326499/job/18026117845

cmd/mount_test.go-3-4: score:1.00 failed:0, passed:62, compile error:0, out of coverage:0, skip by comment:0, others:0
Job detail: https://github.com/juicedata/juicefs/actions/runs/6635326499/job/18026117721

cmd/mount_test.go-1-4: score:1.00 failed:0, passed:62, compile error:0, out of coverage:0, skip by comment:0, others:0
Job detail: https://github.com/juicedata/juicefs/actions/runs/6635326499/job/18026117477

cmd/mount_test.go-2-4: score:1.00 failed:0, passed:57, compile error:0, out of coverage:5, skip by comment:0, others:0
Job detail: https://github.com/juicedata/juicefs/actions/runs/6635326499/job/18026117595

Usage: https://github.com/juicedata/juicefs/blob/main/.github/scripts/mutate/how_to_use_mutate_test.md

@davies davies merged commit 86e69e4 into main Oct 25, 2023
38 checks passed
@davies davies deleted the add-metrics-for-sync branch October 25, 2023 03:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

metrics for sync command
2 participants