Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

profile: Support merge of slightly different but similar Profiles.

Aperta
#147 4 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
20/100
Tipo di issue
Funzionalità
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
go

Direzione di ricerca

Inizia da profile.Merge ed esamina come valida i tipi di sample, i tipi di periodo, i periodi, duration, time e la simbolizzazione. Confronta le due direzioni proposte —normalizzare i profili compatibili o supportare più messaggi protobuf di profilo— e definisci il completamento in base a un comportamento documentato e testato per combinare o visualizzare profili Go e C++.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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

Lingua principale
Go
Stelle
9.3k
Fork
682
Merge medio
2g 4h
PR unite (30g)
11

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di google/pprof

Tutte le issue di google/pprof

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.