MCPcopy Index your code
hub / github.com/couchbase/couchbase-python-client / as_dict

Method as_dict

couchbase/diagnostics.py:166–171  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

164 return PingState(self._src_ping.get('state', None))
165
166 def as_dict(self) -> Dict[str, Any]:
167 output = {k: v for k, v in self._src_ping.items() if v is not None}
168 latency = output.pop('latency', None)
169 if latency:
170 output['latency_us'] = latency
171 return output
172
173 def __repr__(self) -> str:
174 return "EndpointPingReport:{}".format(self.as_dict())

Callers 1

__repr__Method · 0.95

Calls 2

itemsMethod · 0.45
popMethod · 0.45

Tested by

no test coverage detected