LCOV - code coverage report
Current view: top level - source/common/stream_info - stream_id_provider_impl.cc (source / functions) Hit Total Coverage
Test: coverage.dat Lines: 0 10 0.0 %
Date: 2024-01-05 06:35:25 Functions: 0 1 0.0 %

          Line data    Source code
       1             : #include "source/common/stream_info/stream_id_provider_impl.h"
       2             : 
       3             : #include "source/common/common/utility.h"
       4             : 
       5             : namespace Envoy {
       6             : namespace StreamInfo {
       7             : 
       8           0 : absl::optional<uint64_t> StreamIdProviderImpl::toInteger() const {
       9           0 :   if (id_.length() < 8) {
      10           0 :     return absl::nullopt;
      11           0 :   }
      12             : 
      13           0 :   uint64_t value;
      14           0 :   if (!StringUtil::atoull(id_.substr(0, 8).c_str(), value, 16)) {
      15           0 :     return absl::nullopt;
      16           0 :   }
      17             : 
      18           0 :   return value;
      19           0 : }
      20             : 
      21             : } // namespace StreamInfo
      22             : } // namespace Envoy

Generated by: LCOV version 1.15