Continuous Profiling data format

更新时间:
复制 MD 格式

Continuous Profiling data is stored in Simple Log Service (SLS) (Project: `proj-xtrace-<encode>-<region-id>`, Logstore: `logstore-profiling`). This topic describes the log data format for Continuous Profiling.

Log data

Field

Type

Description

Example

aggTypes

String

The aggregation method.

sum

dataType

String

The data format.

CallStack

durationNs

Long

The duration of a profiling procedure. Unit: nanoseconds.

10000000000

labels

JSON

The tag information.

{"ip" : "10.10.10.10"}

language

String

The language type.

go

name

String

The name of the top of the stack, accurate to the function name.

runtime.allocm /usr/local/go/src/runtime/proc.go

profileID

String

The UUID generated for this profile.

c3869101-8e6c-43a8-803e-f11b14a30cfe

stack

String

The call relationship, from the second layer of the stack to the bottom.

runtime.newm /usr/local/go/src/runtime/proc.go

runtime.startm /usr/local/go/src/runtime/proc.go

runtime.handoffp /usr/local/go/src/runtime/proc.go

runtime.stoplockedm /usr/local/go/src/runtime/proc.go

runtime.schedule /usr/local/go/src/runtime/proc.go

runtime.goschedImpl /usr/local/go/src/runtime/proc.go

runtime.gopreempt_m /usr/local/go/src/runtime/proc.go

runtime.newstack /usr/local/go/src/runtime/stack.go

runtime.morestack /usr/local/go/src/runtime/asm_amd64.s

stackID

String

Identifies a unique call stack. This ID is used to collect statistics on the execution duration of methods in different call stacks.

70376ab5b5ad88ddadb51b6dfd4c486a

type

String

Profile type.

profile_mem

units

String

The unit of the value.

bytes

val

Double

The value consumed by the function itself.

10000000.00

valueTypes

String

The type of the value.

cpu

Profile types

The following table shows the relationship between profile types, value types, and units.

Profile type

Property

Unit

Meaning

profile_cpu

cpu

nanoseconds

CPU execution duration.

profile_wall_clock

wall_clock

nanoseconds

Actual execution duration.

profile_mem

alloc_in_new_tlab_bytes

bytes

Object space created in a new TLAB.

profile_mem

alloc_in_new_tlab_objects

count

Size of objects allocated within a new TLAB.

profile_mem

alloc_outside_tlab_bytes

bytes

Object space created outside a TLAB.

profile_mem

alloc_outside_tlab_objects

count

The size of new objects allocated outside the TLAB.

profile_goroutines

goroutines

count

Go coroutine usage.

profile_block

block_count

count

Block analysis. The number of times waiting for a shared resource.

profile_block

block_duration

nanoseconds

Block analysis. The time spent waiting for a shared resource.

profile_mutex

mutex_count

count

Mutex lock analysis. The number of locks.

profile_mutex

mutex_duration

nanoseconds

Mutex lock analysis. The duration of locks.

  • CPU: The time the CPU spends executing a code block. This measures the duration a thread actively executes instructions on the CPU, excluding any time the thread is blocked, switched, or waiting for I/O. You can use `profile_cpu` data to locate compute-intensive hot spots and identify performance bottlenecks caused by high CPU utilization. Property: `cpu`. Unit: nanoseconds.

  • MEM: The memory allocation during the execution of a code block. This includes object allocation within a Thread-Local Allocation Buffer (TLAB) (`alloc_in_new_tlab_bytes`/`objects`) and heap memory allocation outside the TLAB (`alloc_outside_tlab_bytes`/`objects`). You can analyze memory usage patterns to find memory leaks, optimize garbage collection (GC) performance, and ensure efficient application memory usage. Units: bytes (for memory space) and count (for number of objects).

  • WALLCLOCK: The actual execution time of a code block from start to finish. This includes CPU execution time plus any pause time from thread blocking, I/O waiting, or lock competition. The `wall_clock` value reflects the user-perceived performance and is always greater than or equal to the CPU time. Property: `wall_clock`. Unit: nanoseconds.

  • GOROUTINE: The usage of Go coroutines. This records information about the creation, scheduling, and destruction of goroutines to help identify concurrent issues, such as goroutine leaks and scheduling bottlenecks. You can analyze goroutine behavior to optimize the performance of concurrent programs. Property: `goroutines`. Unit: count.

  • BLOCK: The blocking status of a code block during execution. It records the number of times the code block waits for shared resources (`block_count`) and the total waiting time (`block_duration`). You can analyze blocking data to find resource competition hot spots, optimize concurrent access patterns, and avoid performance bottlenecks. Units: count (for number of times) and nanoseconds (for time).

  • MUTEX: The usage of mutex locks. It records the number of times a lock is acquired (`mutex_count`) and the total time the lock is held (`mutex_duration`). You can analyze lock usage patterns to identify lock competition issues, optimize concurrent design, and improve the program's concurrent performance. Units: count (for number of times) and nanoseconds (for time).