#include "perfetto/ext/trace_processor/rpc/query_result_serializer.h"
#include <vector>
#include "perfetto/protozero/packed_repeated_fields.h"
#include "perfetto/protozero/proto_utils.h"
#include "perfetto/protozero/scattered_heap_buffer.h"
#include "src/trace_processor/iterator_impl.h"
#include "protos/perfetto/trace_processor/trace_processor.pbzero.h"
namespace perfetto {
namespace trace_processor {
namespace {
pu;
BatchProto;
ResultProto;
static constexpr uint32_t kPaddingFieldId = …;
uint8_t MakeLenDelimTag(uint32_t field_num) { … }
}
QueryResultSerializer::QueryResultSerializer(Iterator iter)
: … { … }
QueryResultSerializer::~QueryResultSerializer() = default;
bool QueryResultSerializer::Serialize(std::vector<uint8_t>* buf) { … }
bool QueryResultSerializer::Serialize(protos::pbzero::QueryResult* res) { … }
void QueryResultSerializer::SerializeBatch(protos::pbzero::QueryResult* res) { … }
void QueryResultSerializer::MaybeSerializeError(
protos::pbzero::QueryResult* res) { … }
void QueryResultSerializer::SerializeMetadata(
protos::pbzero::QueryResult* res) { … }
}
}