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

godeltaprof frames with generics are different compared to go runtime #69

Closed
korniltsev opened this issue Nov 23, 2023 · 2 comments
Closed

Comments

@korniltsev
Copy link
Collaborator

I've noticed a difference in profiles produced by godeltaprof vs go runtime related to generics.

I personally like the [...] version much more, but I think there should be an option to have both behaviors

github.com/felixge/httpsnoop.CaptureMetricsFn;github.com/felixge/httpsnoop.(*Metrics).CaptureMetrics;github.com/grafana/dskit/middleware.(*Instrument).Wrap.Instrument.Wrap.func1.2;net/http.HandlerFunc.ServeHTTP;github.com/grafana/pyroscope/pkg/phlare.glob..func1.1;github.com/gorilla/mux.(*Router).ServeHTTP;github.com/bufbuild/connect-go.(*Handler).ServeHTTP;github.com/bufbuild/connect-go.NewUnaryHandler[...].func2;github.com/grafana/pyroscope/pkg/tenant.(*authInterceptor).WrapUnary.func1;github.com/bufbuild/connect-go.NewUnaryHandler[...].func1;github.com/grafana/pyroscope/pkg/ingester.(*Ingester).Push;github.com/grafana/pyroscope/pkg/ingester.forInstanceUnary[...];github.com/grafana/pyroscope/pkg/ingester.(*Ingester).forInstance;github.com/grafana/pyroscope/pkg/ingester.(*Ingester).GetOrCreateInstance;github.com/grafana/pyroscope/pkg/ingester.newInstance;github.com/grafana/pyroscope/pkg/phlaredb.New;github.com/grafana/pyroscope/pkg/phlaredb.(*BlockQuerier).Sync;github.com/grafana/pyroscope/pkg/phlaredb.(*BlockQuerier).BlockMetas;github.com/grafana/pyroscope/pkg/objstore.(*PrefixedBucket).Iter;github.com/grafana/pyroscope/pkg/objstore.(*PrefixedBucket).Iter;github.com/grafana/pyroscope/pkg/objstore/providers/filesystem.(*Bucket).Iter;github.com/thanos-io/objstore/tracing/opentracing.TracingBucket.Iter;github.com/thanos-io/objstore/tracing/opentracing.doWithSpan;github.com/thanos-io/objstore/tracing/opentracing.(*TracingBucket).Iter.TracingBucket.Iter.func1;github.com/thanos-io/objstore.(*metricBucket).Iter;github.com/thanos-io/objstore/providers/filesystem.(*Bucket).Iter;github.com/thanos-io/objstore/providers/filesystem.isDirEmpty;os.(*File).Readdir;os.(*File).readdir 5461

vs

github.com/felixge/httpsnoop.CaptureMetricsFn;github.com/felixge/httpsnoop.(*Metrics).CaptureMetrics;github.com/grafana/dskit/middleware.(*Instrument).Wrap.Instrument.Wrap.func1.2;net/http.HandlerFunc.ServeHTTP;github.com/grafana/pyroscope/pkg/phlare.glob..func1.1;github.com/gorilla/mux.(*Router).ServeHTTP;github.com/bufbuild/connect-go.(*Handler).ServeHTTP;github.com/bufbuild/connect-go.NewUnaryHandler[go.shape.struct { github.com/grafana/pyroscope/api/gen/proto/go/push/v1.state google.golang.org/protobuf/internal/impl.MessageState; github.com/grafana/pyroscope/api/gen/proto/go/push/v1.sizeCache int32; github.com/grafana/pyroscope/api/gen/proto/go/push/v1.unknownFields []uint8; Series []*github.com/grafana/pyroscope/api/gen/proto/go/push/v1.RawProfileSeries "protobuf:\"bytes,1,rep,name=series,proto3\" json:\"series,omitempty\"" },go.shape.struct { github.com/grafana/pyroscope/api/gen/proto/go/push/v1.state google.golang.org/protobuf/internal/impl.MessageState; github.com/grafana/pyroscope/api/gen/proto/go/push/v1.sizeCache int32; github.com/grafana/pyroscope/api/gen/proto/go/push/v1.unknownFields []uint8 }].func2;github.com/grafana/pyroscope/pkg/tenant.(*authInterceptor).WrapUnary.func1;github.com/bufbuild/connect-go.NewUnaryHandler[go.shape.struct { github.com/grafana/pyroscope/api/gen/proto/go/push/v1.state google.golang.org/protobuf/internal/impl.MessageState; github.com/grafana/pyroscope/api/gen/proto/go/push/v1.sizeCache int32; github.com/grafana/pyroscope/api/gen/proto/go/push/v1.unknownFields []uint8; Series []*github.com/grafana/pyroscope/api/gen/proto/go/push/v1.RawProfileSeries "protobuf:\"bytes,1,rep,name=series,proto3\" json:\"series,omitempty\"" },go.shape.struct { github.com/grafana/pyroscope/api/gen/proto/go/push/v1.state google.golang.org/protobuf/internal/impl.MessageState; github.com/grafana/pyroscope/api/gen/proto/go/push/v1.sizeCache int32; github.com/grafana/pyroscope/api/gen/proto/go/push/v1.unknownFields []uint8 }].func1;github.com/grafana/pyroscope/pkg/ingester.(*Ingester).Push;github.com/grafana/pyroscope/pkg/ingester.forInstanceUnary[go.shape.*uint8];github.com/grafana/pyroscope/pkg/ingester.(*Ingester).forInstance;github.com/grafana/pyroscope/pkg/ingester.(*Ingester).GetOrCreateInstance;github.com/grafana/pyroscope/pkg/ingester.newInstance;github.com/grafana/pyroscope/pkg/phlaredb.New;github.com/grafana/pyroscope/pkg/phlaredb.(*BlockQuerier).Sync;github.com/grafana/pyroscope/pkg/phlaredb.(*BlockQuerier).BlockMetas;github.com/grafana/pyroscope/pkg/objstore.(*PrefixedBucket).Iter;github.com/grafana/pyroscope/pkg/objstore.(*PrefixedBucket).Iter;github.com/grafana/pyroscope/pkg/objstore/providers/filesystem.(*Bucket).Iter;github.com/thanos-io/objstore/tracing/opentracing.TracingBucket.Iter;github.com/thanos-io/objstore/tracing/opentracing.doWithSpan;github.com/thanos-io/objstore/tracing/opentracing.(*TracingBucket).Iter.TracingBucket.Iter.func1;github.com/thanos-io/objstore.(*metricBucket).Iter;github.com/thanos-io/objstore/providers/filesystem.(*Bucket).Iter;github.com/thanos-io/objstore/providers/filesystem.isDirEmpty;os.(*File).Readdir;os.(*File).readdir 5461
@kolesnikovae
Copy link
Contributor

How did you find this? I'm asking because we do substitute type parameters in the backend:

@korniltsev
Copy link
Collaborator Author

I was benchmarking it before ingestion

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

No branches or pull requests

2 participants