Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

profile: Support merge of slightly different but similar Profiles.

Đang mở
#147 4 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
20/100
Loại issue
Tính năng
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
go
Lĩnh vực
performance, tooling

Hướng nghiên cứu

Bắt đầu với profile.Merge và kiểm tra cách nó xác thực các kiểu sample, kiểu period, period, duration, time và symbolization. So sánh hai hướng được đề xuất —chuẩn hóa các profile tương thích hoặc hỗ trợ nhiều thông điệp protobuf profile— và xác định việc hoàn thành dựa trên hành vi được ghi lại và kiểm thử để kết hợp hoặc trực quan hóa các profile Go và C++.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Priority: p3 type: feat

I want a way to combine memory profiles collected by different languages on the same process. (e.g. Go and C++)

profile.Merge provides merging of multiple profile.Profiles, but the merge operation is allowed only when the Profiles contain the same types and the period type.
Go's and C++'s memory profiles have the same period type, but the sample types are different, so profile.Merge is unhappy about it.

  • Go
    PeriodType: space bytes
    Period: 524288
    Samples: alloc_objects/count alloc_space/bytes inuse_objects/count inuse_space/bytes

  • C++
    PeriodType: space bytes
    Period: 2097152
    Samples: objects/count space/bytes[dflt]

I see two options:

  1. Extend or provide a variation of profile.Merge that accepts slightly different profiles, maps sample types, and outputs the intersection.
    a) Must be careful about handling of the different Periods. (may need normalization. I am afraid the current Merge doesn't do anything complex other than choosing max Period and adding up values.)
    b) Handling of Duration/Time should be carefully done.
    c) Also, it's possible the one profile may include symbolization info while another doesn't. Does the final output have to drop all symbols in this case?

  2. Extend the http endpoint or profile output format to include multiple profile proto messages, and let the pprof tool visualize and analyze the multiple profiles separately. For example, layout Go and C++ allocation graphs in separate groups, but in the same svg graph.

If the normalization required by 1) can't be done correctly, I'd prefer the option 2).

@rauls5382 @aalexand

Ngôn ngữ chính
Go
Star
9.3k
Fork
682
Merge trung bình
2 ngày 4 giờ
Pull request đã merge (30 ngày)
11

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của google/pprof

Tất cả issue của google/pprof

Issue tương tự

Thêm issue về Go

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.