You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "lizining1231 (via GitHub)" <gi...@apache.org> on 2026/09/04 13:33:42 UTC

[PR] feat(triple): cut per-message marshal allocations with a pooled MarshalAppend codec path [dubbo-go]

lizining1231 opened a new pull request, #3718:
URL: https://github.com/apache/dubbo-go/pull/3718

   ### Description
   Fixes #3717
   Triple unary RPCs serialize every payload through `codec.Marshal`, which calls `proto.Marshal`. Because `proto.Marshal` always starts from `nil`, each message pays a structural per-request allocation tax: a fresh `[]byte` of ~L bytes is allocated and zeroed (`memclr`) from scratch, then `bytes.NewBuffer(raw)` wraps it with a ~40B escaping allocation before the bytes are written to the transport. 
   
   1. **Per-message output slice (optimization point A)**: `proto.Marshal` builds the encoded payload from a `nil` starting point, so the slice can never reuse the pooled capacity that `bufferPool` already holds. Each message allocates ~L bytes and memclr-zeroes them (~53µs at 1MiB), even though the pool hands out a reusable `*bytes.Buffer` on the same call path.
   2. **Fresh wrapper + transport copy (optimization point B)**: the freshly allocated slice is wrapped by `bytes.NewBuffer(raw)` (a ~40B escaping allocation) and then copied wholesale into the transport writer, while the pooled buffer underneath is returned without its underlying array ever being reused.
   3. **Server-side generic responses allocate twice**: non-IDL server responses are wrapped in a `TripleResponseWrapper` by `tripleServerCodecSession`, serializing the payload and the wrapper as two separate allocations.
   
   The fix mirrors the approach upstream connect-go already ships (`marshalAppend`): marshal into the caller-provided pooled buffer instead of into a fresh slice. It is purely additive, codecs without the extension are untouched and keep their exact previous behavior.
   
   ### Changes
   
   **1. Optional `marshalAppender` codec extension (non-breaking)**
   
   `protocol/triple/triple_protocol/codec.go`:
   - Add optional interface `marshalAppender { MarshalAppend(dst []byte, message any) ([]byte, error) }`; implementing codecs serialize into a caller-provided buffer. The `Codec` interface itself is unchanged, so hessian2/json/msgpack and third-party codecs compile and behave exactly as before.
   - `protoBinaryCodec.MarshalAppend` delegates to `proto.MarshalOptions{}.MarshalAppend`, which drives the same protobuf encoder, so output is byte-identical to `Marshal`, and the cap-gated pure-append path means zero allocation when the buffer's spare capacity suffices.
   - `tripleServerCodecSession.MarshalAppend` extends the per-request server codec: the IDL leg forwards to the delegate's appender, and the non-IDL leg marshals the inner payload with its own codec but appends the outer `TripleResponseWrapper` into the caller-provided buffer instead of allocating a fresh slice, so server responses reach the fast path too.
   
   `protocol/triple/triple_protocol/buffer_pool.go`:
   - Add shared helper `marshalToPool(pool, appender, message)`: borrow a `*bytes.Buffer` from `bufferPool`, call `MarshalAppend` into its spare capacity; when the appender had to grow the slice, swap the larger array back into the pooled buffer so the capacity is recycled instead of dropped; on failure the buffer is returned and a `CodeInternal` error surfaces. Both marshalers now share one borrow/marshal/adopt dance.
   
   **2. Fast path in both unary marshalers + a shared compression tail**
   
   `protocol/triple/triple_protocol/envelope.go` (`envelopeWriter.Marshal`, gRPC/Triple envelope wire):
   - Probe the codec for `marshalAppender`; on hit run the new `marshalAndWrite` (marshalToPool → `Write(&envelope{Data: buffer})`), preserving the backup-codec fallback semantics of the slow path. On miss the existing `marshalWithFallback` slow path is kept unchanged.
   
   `protocol/triple/triple_protocol/protocol_triple.go` (`tripleUnaryMarshaler.Marshal`, Triple unary body wire):
   - Same probe: capable codecs take the new `marshalAndWrite` fast path; codecs without the extension keep the old `codec.Marshal` slow path unchanged.
   - The compression tail previously inlined at the end of `Marshal` is extracted into one shared `compressAndWrite`, called by both the fast and slow paths, so the compression threshold, pooled gzip, `sendMaxBytes` enforcement, compression header and final write can never drift between the two.
   
   ```mermaid
   flowchart TD
       classDef base fill:#f6f8fa,stroke:#8b949e
       classDef added fill:#fff3b0,stroke:#e3a008,stroke-width:2px
   
       C["Client sends request<br/>conn.Send → marshaler<br/>codec = configured codec (proto → protoBinaryCodec)"]:::base
       S["Server sends response<br/>conn.Send → marshaler<br/>codec = wrapped as tripleServerCodecSession (supports generic calls)"]:::base
   
       M["tripleUnaryMarshaler.Marshal (L504)<br/>Shared by both sides"]:::base
       P["Capability probe: m.codec.(marshalAppender)"]:::added
   
       F["Optimized path<br/>marshalAndWrite → marshalToPool<br/>→ MarshalAppender with buffer pooling → zero allocation<br/>(Implementers: protoBinaryCodec / server session wrapper)"]:::added
       SL["Legacy path<br/>codec.Marshal → always allocates"]:::base
   
       T["compressAndWrite (L540)<br/>Compression / size limit / write header / write body<br/>Common tail path shared by fast & slow (extracted in this change)"]:::added
       O["HTTP body"]:::base
   
       C --> M
       S --> M
       M --> P
       P -->|hit| F
       P -->|miss| SL
       F --> T
       SL --> T
       T --> O
   ```
   
   ### Test
   
   `marshal_perf_regression_test.go`
   
   | Test | Description |
   |---|---|
   | `TestMarshalPerfWireParity` | Core invariant: for the same message and compression setting the MarshalAppend fast path emits byte-for-byte the same wire output as the slow `codec.Marshal` path, on both the triple body wire and the envelope wire |
   | `TestMarshalPerfPoolInvariants` | `bufferPool.Get` returns an empty buffer, `Put` resets length; `nil` message writes nothing; an empty proto yields a zero-length (5-byte prefix only) envelope; the `compressMinBytes` boundary anchored on the real encoded length never panics and both paths agree on the compression flag |
   | `TestMarshalPerfBackupCodecFallback` | A failing codec implementing both `Codec` and `marshalAppender` forces both paths into the backup-codec fallback; output is byte-identical to the healthy reference, with no double fallback, `CodeInternal` on final error, and no panic when the backup is nil |
   | `TestMarshalPerfCompressionAndMaxBytes` | Both paths enforce the compression threshold and `sendMaxBytes` identically: over-limit messages return `CodeResourceExhausted`, compressed messages set the `Content-Encoding` header on both |
   | `TestMarshalPerfLargeBufferDropped` | Buffers grown beyond the 8MiB recycle cap are dropped, not reused, and a large message leaves no residue for the next small message |
   | `TestMarshalPerfConcurrentSend` | Concurrent sends share the same marshaler and `bufferPool` with no data races (run under `-race`) |
   | `TestMarshalPerfTypeGuard` | Scope guard: codecs whose `MarshalAppend` is not byte-identical to `Marshal` (hessian2/json/msgpack/backup wrapper) must not implement `marshalAppender`; only `protoBinaryCodec` and `tripleServerCodecSession` do |
   | `TestMarshalPerfErrorGuard` | A non-proto message never panics on either path and surfaces as `CodeInternal`, matching slow-path behavior |
   | `TestMarshalPerfServerSessionFastPath` | `tripleServerCodecSession` reaches the MarshalAppend branch end to end for both IDL and non-IDL responses with byte-identical output |
   
   `marshal_perf_bench_test.go`
   
   | Benchmark | Description |
   |---|---|
   | `BenchmarkUnaryMarshalerFastPath` | `tripleUnaryMarshaler.Marshal` with `protoBinaryCodec` (MarshalAppend fast path), payloads 128B / 1KiB / 16KiB / 1MiB |
   | `BenchmarkUnaryMarshalerSlowPath` | Control: same marshaler with `noAppenderCodec` (no `marshalAppender`, old `codec.Marshal` path), same payloads |
   | `BenchmarkUnaryMarshalerFastPathCompressed` / `SlowPathCompressed` | Fast/slow A/B on the gzip-compressed branch (second pooled buffer, compression header, compressed-size limit check) |
   | `BenchmarkEnvelopeWriterFastPath` / `SlowPath` | Same A/B for `envelopeWriter.Marshal` (gRPC/Triple envelope wire) |
   | `BenchmarkEnvelopeWriterFastPathCompressed` / `SlowPathCompressed` | Same A/B on the compressed envelope branch |
   
   ### Validation
   #### pprof CPU Profile diff
   
   <img width="1915" height="958" alt="image" src="https://github.com/user-attachments/assets/da23768b-0a92-4a41-93ab-0634ac295604" />
   
   #### Marshal Fast-Path Benchmark Results
   
   **go test bench -bench=BenchmarkMarshal**
   
   **allocs/op reduced from 3 to 1**
   
   | Message | Before  | After |
   | ------- | ------------------ | ----------------- |
   | 128B    | 3                  | 1                 |
   | 1KiB    | 3                  | 1                 |
   | 16KiB   | 3                  | 1                 |
   | 1MiB    | 3                  | 1                 |
   
   Both wire slow paths incurred 3 allocations per op, coming from proto marshal + gzip compression buffer + envelope/header overhead. After optimization, only 1 allocation remains, from the gzip compression pool's initial buffer, which is then reused by the pool.
   
   **B/op reduced by approximately −99.8%**
   
   | Message | Before | After  | Reduction |
   | ------- | ------------- | ------------ | --------- |
   | 128B    | 237           | 6            | -97.47%   |
   | 1KiB    | 1252          | 7            | -99.44%   |
   | 16KiB   | 18712         | 23           | -99.88%   |
   | 1MiB    | 1069533       | 3482         | -99.67%   |
   
   Before optimization, B/op ≈ message size, with full payload copy/allocation per request. After optimization, only fixed overhead remains, and it no longer grows with payload size.
   
   Reproduce:
   
   ```bash
   # pprof
   go test -run '^$' -bench '^BenchmarkUnaryMarshalerSlowPath$' -benchtime=30000x \
     -cpuprofile cpu_slow.out ./protocol/triple/triple_protocol/
   go test -run '^$' -bench '^BenchmarkUnaryMarshalerFastPath$' -benchtime=30000x \
     -cpuprofile cpu_fast.out ./protocol/triple/triple_protocol/
   go tool pprof -top -diff_base cpu_slow.out cpu_fast.out
   # go test bench
   go test -run '^$' -bench '^BenchmarkEnvelopeWriter(FastPath|SlowPath)Compressed$' \
     -benchmem -count=3 ./protocol/triple/triple_protocol/
   
   ```
   ### Checklist
   - [x] I confirm the target branch is `develop`
   - [x] I have run `make fmt` to format my code
   - [x] I have run `make test` to run local tests
   - [x] I have added tests that prove my fix is effective or that my feature works
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [PR] feat(triple): cut per-message marshal allocations with a pooled MarshalAppend codec path [dubbo-go]

Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #3718:
URL: https://github.com/apache/dubbo-go/pull/3718#issuecomment-5543628752

   ## [![Quality Gate Passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-passed-20px.png 'Quality Gate Passed')](https://sonarcloud.io/dashboard?id=apache_dubbo-go&pullRequest=3718) **Quality Gate passed**  
   Issues  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [6 New issues](https://sonarcloud.io/project/issues?id=apache_dubbo-go&pullRequest=3718&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/accepted-16px.png '') [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_dubbo-go&pullRequest=3718&issueStatuses=ACCEPTED)
   
   Measures  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo-go&pullRequest=3718&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_dubbo-go&pullRequest=3718&metric=new_coverage&view=list)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_dubbo-go&pullRequest=3718&metric=new_duplicated_lines_density&view=list)  
     
   <!-- sqra-placement-anchor -->
   [See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_dubbo-go&pullRequest=3718)
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [PR] feat(triple): cut per-message marshal allocations with a pooled MarshalAppend codec path [dubbo-go]

Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #3718:
URL: https://github.com/apache/dubbo-go/pull/3718#issuecomment-5541203799

   ## [![Quality Gate Passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-passed-20px.png 'Quality Gate Passed')](https://sonarcloud.io/dashboard?id=apache_dubbo-go&pullRequest=3718) **Quality Gate passed**  
   Issues  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [6 New issues](https://sonarcloud.io/project/issues?id=apache_dubbo-go&pullRequest=3718&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/accepted-16px.png '') [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_dubbo-go&pullRequest=3718&issueStatuses=ACCEPTED)
   
   Measures  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo-go&pullRequest=3718&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_dubbo-go&pullRequest=3718&metric=new_coverage&view=list)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_dubbo-go&pullRequest=3718&metric=new_duplicated_lines_density&view=list)  
     
   <!-- sqra-placement-anchor -->
   [See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_dubbo-go&pullRequest=3718)
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [PR] feat(triple): cut per-message marshal allocations with a pooled MarshalAppend codec path [dubbo-go]

Posted by "AlexStocks (via GitHub)" <gi...@apache.org>.
AlexStocks merged PR #3718:
URL: https://github.com/apache/dubbo-go/pull/3718


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [PR] feat(triple): cut per-message marshal allocations with a pooled MarshalAppend codec path [dubbo-go]

Posted by "lizining1231 (via GitHub)" <gi...@apache.org>.
lizining1231 commented on PR #3718:
URL: https://github.com/apache/dubbo-go/pull/3718#issuecomment-5543894376

   ci 问题已修复


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [PR] feat(triple): cut per-message marshal allocations with a pooled MarshalAppend codec path [dubbo-go]

Posted by "Alanxtl (via GitHub)" <gi...@apache.org>.
Alanxtl commented on PR #3718:
URL: https://github.com/apache/dubbo-go/pull/3718#issuecomment-5549107059

   并发测试目前只验证输出长度,建议让不同 goroutine 发送不同内容,并解码逐条校验,以捕获长度相同但内容被覆盖的问题。


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [PR] feat(triple): cut per-message marshal allocations with a pooled MarshalAppend codec path [dubbo-go]

Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #3718:
URL: https://github.com/apache/dubbo-go/pull/3718#issuecomment-5541513852

   ## [![Quality Gate Passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-passed-20px.png 'Quality Gate Passed')](https://sonarcloud.io/dashboard?id=apache_dubbo-go&pullRequest=3718) **Quality Gate passed**  
   Issues  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [6 New issues](https://sonarcloud.io/project/issues?id=apache_dubbo-go&pullRequest=3718&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/accepted-16px.png '') [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_dubbo-go&pullRequest=3718&issueStatuses=ACCEPTED)
   
   Measures  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo-go&pullRequest=3718&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_dubbo-go&pullRequest=3718&metric=new_coverage&view=list)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_dubbo-go&pullRequest=3718&metric=new_duplicated_lines_density&view=list)  
     
   <!-- sqra-placement-anchor -->
   [See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_dubbo-go&pullRequest=3718)
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [PR] feat(triple): cut per-message marshal allocations with a pooled MarshalAppend codec path [dubbo-go]

Posted by "lizining1231 (via GitHub)" <gi...@apache.org>.
lizining1231 commented on PR #3718:
URL: https://github.com/apache/dubbo-go/pull/3718#issuecomment-5551650692

   > 并发测试目前只验证输出长度,建议让不同 goroutine 发送不同内容,并解码逐条校验,以捕获长度相同但内容被覆盖的问题。
   
   感谢review!已完成


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [PR] feat(triple): cut per-message marshal allocations with a pooled MarshalAppend codec path [dubbo-go]

Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #3718:
URL: https://github.com/apache/dubbo-go/pull/3718#issuecomment-5551527125

   ## [![Quality Gate Passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-passed-20px.png 'Quality Gate Passed')](https://sonarcloud.io/dashboard?id=apache_dubbo-go&pullRequest=3718) **Quality Gate passed**  
   Issues  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [7 New issues](https://sonarcloud.io/project/issues?id=apache_dubbo-go&pullRequest=3718&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/accepted-16px.png '') [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_dubbo-go&pullRequest=3718&issueStatuses=ACCEPTED)
   
   Measures  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo-go&pullRequest=3718&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_dubbo-go&pullRequest=3718&metric=new_coverage&view=list)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_dubbo-go&pullRequest=3718&metric=new_duplicated_lines_density&view=list)  
     
   <!-- sqra-placement-anchor -->
   [See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_dubbo-go&pullRequest=3718)
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [PR] feat(triple): cut per-message marshal allocations with a pooled MarshalAppend codec path [dubbo-go]

Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #3718:
URL: https://github.com/apache/dubbo-go/pull/3718#issuecomment-5541331161

   ## [Codecov](https://app.codecov.io/gh/apache/dubbo-go/pull/3718?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   :x: Patch coverage is `92.42424%` with `5 lines` in your changes missing coverage. Please review.
   :white_check_mark: Project coverage is 56.93%. Comparing base ([`60d1c2a`](https://app.codecov.io/gh/apache/dubbo-go/commit/60d1c2a949f0ee0da4be3fe09fb79d295491e040?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`b70618f`](https://app.codecov.io/gh/apache/dubbo-go/commit/b70618fb26bd2a3a424040b4fbaaf7d89039e763?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   :warning: Report is 970 commits behind head on develop.
   
   | [Files with missing lines](https://app.codecov.io/gh/apache/dubbo-go/pull/3718?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
   |---|---|---|
   | [protocol/triple/triple\_protocol/codec.go](https://app.codecov.io/gh/apache/dubbo-go/pull/3718?src=pr&el=tree&filepath=protocol%2Ftriple%2Ftriple_protocol%2Fcodec.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cHJvdG9jb2wvdHJpcGxlL3RyaXBsZV9wcm90b2NvbC9jb2RlYy5nbw==) | 83.33% | [2 Missing and 2 partials :warning: ](https://app.codecov.io/gh/apache/dubbo-go/pull/3718?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [protocol/triple/triple\_protocol/protocol\_triple.go](https://app.codecov.io/gh/apache/dubbo-go/pull/3718?src=pr&el=tree&filepath=protocol%2Ftriple%2Ftriple_protocol%2Fprotocol_triple.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cHJvdG9jb2wvdHJpcGxlL3RyaXBsZV9wcm90b2NvbC9wcm90b2NvbF90cmlwbGUuZ28=) | 93.33% | [0 Missing and 1 partial :warning: ](https://app.codecov.io/gh/apache/dubbo-go/pull/3718?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@             Coverage Diff              @@
   ##           develop    #3718       +/-   ##
   ============================================
   + Coverage    46.76%   56.93%   +10.16%     
   ============================================
     Files          295      478      +183     
     Lines        17172    38635    +21463     
   ============================================
   + Hits          8031    21996    +13965     
   - Misses        8287    14924     +6637     
   - Partials       854     1715      +861     
   ```
   </details>
   
   [:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/dubbo-go/pull/3718?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).   
   :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org