Closed jshencode closed 4 years ago
Merging #350 into master will decrease coverage by
<.01%
. The diff coverage is59.37%
.
@@ Coverage Diff @@
## master #350 +/- ##
==========================================
- Coverage 71.18% 71.18% -0.01%
==========================================
Files 177 177
Lines 23533 23553 +20
==========================================
+ Hits 16752 16766 +14
- Misses 5438 5445 +7
+ Partials 1343 1342 -1
Impacted Files | Coverage Δ | |
---|---|---|
subscriber/common/rules/job_config.go | 68.42% <ø> (ø) |
:arrow_up: |
utils/http.go | 19.07% <ø> (ø) |
:arrow_up: |
memstore/ingestion.go | 81.22% <100%> (+0.07%) |
:arrow_up: |
memstore/recovery.go | 74.82% <100%> (-0.18%) |
:arrow_down: |
memstore/common/data_value.go | 79.09% <44.82%> (-1.69%) |
:arrow_down: |
memstore/backfill.go | 74.52% <50%> (+0.27%) |
:arrow_up: |
memstore/archive_store.go | 79.77% <66.66%> (+0.11%) |
:arrow_up: |
subscriber/common/sink/sink.go | 60.46% <66.66%> (+0.94%) |
:arrow_up: |
memstore/common/upsert_batch.go | 58.17% <70%> (+3.26%) |
:arrow_up: |
memstore/common/primary_key.go | 44% <80%> (+0.52%) |
:arrow_up: |
... and 2 more |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update a425d38...703d10a. Read the comment docs.
Profiling shows that insert primary key has majority time taken in two allocations
fixes
the first allocated slice primaryKeyValues is just for temporarily holding the primary key data values so we can remove and use a iterator interface instead
the second allocation is done on each row for every upsert batch, since primary key bytes are the same for each upsert batch, we can just allocate one key slice and share.
additionally, modified upsertBatch.GetDataValue method signature to make it fit the BatchReader interface