Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/dianping/cat
/ _
Function
_
lib/python/src/cat/version.py:38–39 ·
view source on GitHub ↗
(x)
Source
from the content-addressed store, hash-verified
36
ffi = cffi.FFI()
37
38
def
_(x):
39
return
ffi.new(
"char[]"
, x.encode(
"utf-8"
))
40
else
:
41
def
_(x):
42
return
x.encode(
'utf-8'
)
if
isinstance(x, unicode)
else
x
Callers
13
set_status
Method · 0.70
add_data
Method · 0.70
set_status
Method · 0.70
__add_data
Method · 0.70
__add_kv
Method · 0.70
complete
Method · 0.70
__init_ccat
Method · 0.70
new_transaction
Method · 0.70
new_heartbeat
Method · 0.70
log_event
Method · 0.70
log_error
Method · 0.70
log_metric_for_count
Method · 0.70
Calls
1
encode
Method · 0.65
Tested by
no test coverage detected