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

Fast Delta Profiling #1511

Merged
merged 41 commits into from
Nov 11, 2022
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
cba2212
vendor fastdelta
pmbauer Sep 30, 2022
7e0d4cf
add interface for deltaProfiler
pmbauer Oct 5, 2022
e0932da
fastdelta: add duration_nanos tracking
pmbauer Oct 5, 2022
7a10548
fix test fixture model
pmbauer Oct 5, 2022
a001c50
add fastDeltaProfiler implementation
pmbauer Oct 5, 2022
93d0d1f
add comparingDeltaProfiler
pmbauer Oct 7, 2022
5c50644
fastdelta: re-use gz reader and writer
pmbauer Oct 10, 2022
42cfc89
add DD_PROFILING_DELTA_METHOD env var
pmbauer Oct 10, 2022
a5df0a7
fastdelta: improve comparison telemetry
pmbauer Oct 10, 2022
c55131b
lint fixes
pmbauer Oct 11, 2022
ceb2636
add copyright headers
pmbauer Oct 11, 2022
5d31bb8
fastdelta: remove sort allocations (#1512)
felixge Oct 12, 2022
a1a4173
Merge remote-tracking branch 'origin/main' into feature-fast-delta-pr…
pmbauer Oct 18, 2022
61b0605
review: use os.Getenv instead of internal.StringEnv
pmbauer Oct 19, 2022
e57c26f
review: remove sized map initialization
pmbauer Oct 19, 2022
36df5f3
review: remove unused methods
pmbauer Oct 19, 2022
b8d1d76
review: reformat imports
pmbauer Oct 19, 2022
e9f7210
review: clarify gzip check
pmbauer Oct 19, 2022
c5311f9
review: fix breaking change for public StatsdClient
pmbauer Oct 19, 2022
a3ec741
review: decrease indentation in mergeSamplesPass
pmbauer Oct 19, 2022
2316c78
review: reduce indentation of pass functions
pmbauer Oct 19, 2022
c5b54c3
review: move valueTypeIndices to dc
pmbauer Oct 19, 2022
fbb979f
review: refactor parameterized test code for delta profiles
pmbauer Oct 19, 2022
0d65ce7
review: fix another issue with goimports
pmbauer Oct 19, 2022
ea2c505
Merge remote-tracking branch 'origin/main' into feature-fast-delta-pr…
pmbauer Oct 19, 2022
6ba8571
review: make linter happy
pmbauer Oct 19, 2022
fe5ccc5
use type and unit for delta field matching
pmbauer Oct 19, 2022
3578b7c
Merge branch 'main' into feature-fast-delta-profiling
pmbauer Oct 19, 2022
03da7ce
fix missed tests for fe5ccc52
pmbauer Oct 19, 2022
1e94249
Merge remote-tracking branch 'origin/main' into feature-fast-delta-pr…
pmbauer Oct 20, 2022
a4fcf9c
Merge branch 'main' into feature-fast-delta-profiling
pmbauer Oct 20, 2022
1da2b74
fastdelta: make more resilient against malformed inputs (#1536)
nsrip-dd Oct 24, 2022
30ed462
Merge branch 'main' into feature-fast-delta-profiling
pmbauer Oct 26, 2022
9078b39
Update profiler/profile.go
pmbauer Oct 28, 2022
2b52f54
nits and perf improvements (#1550)
felixge Nov 1, 2022
90e1bf9
profiler/internal/fastdelta: hash location addresses correctly (#1558)
nsrip-dd Nov 1, 2022
e8bfed7
fastdelta: reduce allocs by up to 90% (#1559)
felixge Nov 1, 2022
469aab7
profiler/internal/fastdelta: add real heap profile stress test (#1557)
nsrip-dd Nov 7, 2022
9003a4b
Merge branch 'main' into feature-fast-delta-profiling
nsrip-dd Nov 7, 2022
ebd6ea5
refactor fast delta profiling (#1563)
felixge Nov 11, 2022
6257837
Merge branch 'main' into feature-fast-delta-profiling
nsrip-dd Nov 11, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,10 @@ require (
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a // indirect
github.com/richardartoul/molecule v1.0.0
github.com/ryanuber/go-glob v1.0.0 // indirect
github.com/secure-systems-lab/go-securesystemslib v0.4.0 // indirect
github.com/spaolacci/murmur3 v1.1.0
github.com/spf13/pflag v1.0.5 // indirect
github.com/theupdateframework/go-tuf v0.3.0 // indirect
github.com/tidwall/btree v0.3.0 // indirect
Expand Down
6 changes: 6 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,7 @@ github.com/google/go-cmp v0.5.7 h1:81/ik6ipDQS2aGcBfIN5dHDB36BwrStyeAQquSYCV4o=
github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE=
github.com/google/gofuzz v0.0.0-20161122191042-44d81051d367/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI=
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0=
github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
Expand Down Expand Up @@ -690,6 +691,8 @@ github.com/prometheus/procfs v0.0.0-20181204211112-1dc9a6cbc91a/go.mod h1:c3At6R
github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a h1:9ZKAASQSHhDYGoxY8uLVpewe1GDZ2vu2Tr/vTdVAkFQ=
github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
github.com/richardartoul/molecule v1.0.0 h1:+LFA9cT7fn8KF39zy4dhOnwcOwRoqKiBkPqKqya+8+U=
github.com/richardartoul/molecule v1.0.0/go.mod h1:uvX/8buq8uVeiZiFht+0lqSLBHF+uGV8BrTv8W/SIwk=
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
github.com/rs/cors v1.8.0/go.mod h1:EBwu+T5AvHOcXwvZIkQFjUN6s8Czyqw12GL/Y0tUyRM=
github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ=
Expand Down Expand Up @@ -724,6 +727,8 @@ github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6Mwd
github.com/sirupsen/logrus v1.7.0 h1:ShrD1U9pZB12TX0cVy0DtePoCH97K8EtX+mg7ZARUtM=
github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
github.com/smartystreets/go-aws-auth v0.0.0-20180515143844-0c1422d1fdb9/go.mod h1:SnhjPscd9TpLiy1LpzGSKh3bXCfxxXuqd9xmQJy3slM=
github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI=
github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk=
github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
Expand Down Expand Up @@ -1288,6 +1293,7 @@ gorm.io/gorm v1.9.19/go.mod h1:0HFTzE/SqkGTzK6TlDPPQbAYCluiVvhzoA1+aVyzenw=
gorm.io/gorm v1.20.0/go.mod h1:0HFTzE/SqkGTzK6TlDPPQbAYCluiVvhzoA1+aVyzenw=
gorm.io/gorm v1.20.6 h1:qa7tC1WcU+DBI/ZKMxvXy1FcrlGsvxlaKufHrT2qQ08=
gorm.io/gorm v1.20.6/go.mod h1:0HFTzE/SqkGTzK6TlDPPQbAYCluiVvhzoA1+aVyzenw=
gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw=
honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
Expand Down
10 changes: 10 additions & 0 deletions internal/env.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,13 @@ func IntEnv(key string, def int) int {
}
return v
}

// StringEnv returns the value of an environment variable, or
// def otherwise.
func StringEnv(key string, def string) string {
pmbauer marked this conversation as resolved.
Show resolved Hide resolved
v, ok := os.LookupEnv(key)
if !ok {
return def
}
return v
}