MCPcopy Create free account
hub / github.com/Snapchat/Valdi / dumpContextsLogs

Method dumpContextsLogs

valdi/src/valdi/runtime/Runtime.cpp:393–412  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

391 auto attributeId = _attributeIds.getIdForName(attributeName);
392
393 viewNode.valueChanged(attributeId, attributeValue, false);
394}
395
396DumpedLogs Runtime::dumpContextsLogs() const {
397 DumpedLogs logs;
398
399 ValueArrayBuilder builder;
400
401 auto contexts = _contextManager.getAllContexts();
402 std::sort(contexts.begin(), contexts.end(), [](const auto& left, const auto& right) -> bool {
403 return left->getContextId() < right->getContextId();
404 });
405
406 for (const auto& context : contexts) {
407 if (!context->getPath().isEmpty()) {
408 builder.append(Value(context->getPath().toString()));
409 }
410 }
411
412 logs.appendMetadata(STRING_LITERAL("ComponentPaths"), Value(builder.build()).toStringBox());
413
414 return logs;
415}

Callers

nothing calls this directly

Calls 12

appendMetadataMethod · 0.80
endMethod · 0.65
appendMethod · 0.65
toStringMethod · 0.65
ValueClass · 0.50
getAllContextsMethod · 0.45
beginMethod · 0.45
getContextIdMethod · 0.45
isEmptyMethod · 0.45
getPathMethod · 0.45
toStringBoxMethod · 0.45
buildMethod · 0.45

Tested by

no test coverage detected