Lower level of python TraceMe to 1
PiperOrigin-RevId: 313802412 Change-Id: Ia7d3e0866f13676b6562f3290ca8385a1a37c312
This commit is contained in:
parent
8383415398
commit
f36a1a090e
|
@ -34,13 +34,15 @@ class TraceMeWrapper {
|
|||
// pybind11::str and pybind11::kwargs are taken by const reference to avoid
|
||||
// python reference-counting overhead.
|
||||
TraceMeWrapper(const pybind11::str& name, const pybind11::kwargs& kwargs)
|
||||
: traceme_([&]() {
|
||||
: traceme_(
|
||||
[&]() {
|
||||
std::string name_and_metadata(name);
|
||||
if (!kwargs.empty()) {
|
||||
AppendMetadata(&name_and_metadata, kwargs);
|
||||
}
|
||||
return name_and_metadata;
|
||||
}) {}
|
||||
},
|
||||
/*level=*/1) {}
|
||||
|
||||
// pybind11::kwargs is taken by const reference to avoid python
|
||||
// reference-counting overhead.
|
||||
|
|
Loading…
Reference in New Issue