26 namespace profile_detail {
30 object_id native_id, std::optional<blob_identity> target_id)
32 output_(std::move(root), std::move(id), std::move(attempt)) {}
34 object_id native_id, std::optional<blob_identity> target_id, Ops & ops)
36 output_(std::move(root), std::move(id), std::move(attempt), 0, ops) {}
43 auto retained = common_bits >> P::unit_shift;
44 auto first = retained << P::unit_shift;
45 output_.
append(retained, key.subview(first, key.size() - first), {});
54 if (
id.hex().
size() != 32)
55 error_detail::raise<std::invalid_argument>(
"file index requires valid dependency identities");
58 static std::optional<blob_identity>
checked(std::optional<blob_identity> target) {
59 if (target && (target->native.hex().size() != 32 || target->index.hex().size() != 32))
60 error_detail::raise<std::invalid_argument>(
"file index requires valid target identities");
70 std::uint64_t
size() const noexcept {
return output->size(); }
86 template <
class P,
class Native = profile_array<P>,
class Ops = posix_
object_ops>
95 :
output_(std::move(root), std::move(id), std::move(attempt), std::move(native_id), std::move(target_id)),
99 :
output_(std::move(root), std::move(id), std::move(attempt), std::move(native_id), std::move(target_id), ops),
122 profile_detail::file_index_output<P, Ops>
output_;
Declares Everett's incremental fractional-index builder.
Definition active_engine.h:18
Streams native and borrowed profile sections with bounded payload buffering.
Definition file_index_builder.h:87
object_write_paths const & paths() const &&=delete
std::uint64_t step(std::uint64_t budget_entries)
Definition file_index_builder.h:115
void push(coded_sample_type const &sample)
Definition file_index_builder.h:113
bool done() const noexcept
Definition file_index_builder.h:107
object_write_paths const & paths() const &noexcept
Definition file_index_builder.h:119
std::uint64_t received_samples() const noexcept
Definition file_index_builder.h:111
bool finished() const noexcept
Definition file_index_builder.h:109
std::shared_ptr< Native const > source_pointer
Definition file_index_builder.h:89
builder_type builder_
Definition file_index_builder.h:123
file_index_builder & operator=(file_index_builder &&)=delete
bool needs_input() const noexcept
Definition file_index_builder.h:105
std::uint64_t size() const noexcept
Definition file_index_builder.h:110
void close_input()
Definition file_index_builder.h:114
profile_detail::file_index_output< P, Ops > output_
Definition file_index_builder.h:122
void push(bit_view key, std::uint64_t target_ordinal)
Definition file_index_builder.h:112
file_index_builder & operator=(file_index_builder const &)=delete
bool has_output() const noexcept
Definition file_index_builder.h:106
coded_sample_type take_coded_output()
Definition file_index_builder.h:117
file_index_builder(std::filesystem::path root, object_id id, object_attempt_id attempt, source_pointer native, object_id native_id, std::optional< blob_identity > target_id=std::nullopt)
Definition file_index_builder.h:93
object_seal_receipt finish(std::uint64_t target_count)
Definition file_index_builder.h:118
file_index_builder(std::filesystem::path root, object_id id, object_attempt_id attempt, source_pointer native, object_id native_id, std::optional< blob_identity > target_id, Ops &ops)
Definition file_index_builder.h:97
sample_type take_output()
Definition file_index_builder.h:116
bool failed() const noexcept
Definition file_index_builder.h:108
file_index_builder(file_index_builder const &)=delete
P policy_type
Definition file_index_builder.h:88
file_index_builder(file_index_builder &&)=delete
Definition index_builder.h:47
void push(bit_view key, std::uint64_t target_ordinal)
Definition index_builder.h:91
std::uint64_t size() const noexcept
Definition index_builder.h:88
bool needs_input() const noexcept
Definition index_builder.h:79
std::uint64_t step(std::uint64_t budget_entries)
Definition index_builder.h:115
auto finish_index(std::uint64_t target_count) -> decltype(std::declval< Output & >().finish(std::declval< profile_detail::index_metadata< P > >()))
Definition index_builder.h:212
sample_type take_output()
Definition index_builder.h:167
bool finished() const noexcept
Definition index_builder.h:86
bool failed() const noexcept
Definition index_builder.h:87
bool done() const noexcept
Definition index_builder.h:83
void close_input()
Definition index_builder.h:109
bool has_output() const noexcept
Definition index_builder.h:82
coded_sample_type take_coded_output()
Definition index_builder.h:178
std::uint64_t received_samples() const noexcept
Definition index_builder.h:89
Definition object_writer.h:39
Definition object_path.h:38
Definition object_writer.h:88
Definition object_writer.h:53
Definition file_index_builder.h:67
bool finished() const noexcept
Definition file_index_builder.h:71
P policy_type
Definition file_index_builder.h:68
std::uint64_t size() const noexcept
Definition file_index_builder.h:70
bool failed() const noexcept
Definition file_index_builder.h:72
object_seal_receipt finish(index_metadata< P > const &metadata)
Definition file_index_builder.h:74
void append_known(bit_view key, std::uint64_t common_bits)
Definition file_index_builder.h:73
file_index_output< P, Ops > * output
Definition file_index_builder.h:69
Definition file_index_builder.h:27
P policy_type
Definition file_index_builder.h:28
object_write_paths const & paths() const &noexcept
Definition file_index_builder.h:40
object_write_paths const & paths() const &&=delete
file_index_output(std::filesystem::path root, object_id id, object_attempt_id attempt, object_id native_id, std::optional< blob_identity > target_id, Ops &ops)
Definition file_index_builder.h:33
profile_file_output< P, stream_role::borrowed, Ops > output_
Definition file_index_builder.h:65
static std::optional< blob_identity > checked(std::optional< blob_identity > target)
Definition file_index_builder.h:58
object_id native_id_
Definition file_index_builder.h:63
void append_known(bit_view key, std::uint64_t common_bits)
Definition file_index_builder.h:42
file_index_output(std::filesystem::path root, object_id id, object_attempt_id attempt, object_id native_id, std::optional< blob_identity > target_id)
Definition file_index_builder.h:29
std::optional< blob_identity > target_id_
Definition file_index_builder.h:64
object_seal_receipt finish(index_metadata< P > const &metadata)
Definition file_index_builder.h:47
bool failed() const noexcept
Definition file_index_builder.h:39
std::uint64_t size() const noexcept
Definition file_index_builder.h:37
static object_id checked(object_id id)
Definition file_index_builder.h:53
bool finished() const noexcept
Definition file_index_builder.h:38
Definition profile_file_output.h:31
Definition profile_file_output.h:44
bool finished() const noexcept
Definition profile_file_output.h:71
object_write_paths const & paths() const &noexcept
Definition profile_file_output.h:73
std::uint64_t size() const noexcept
Definition profile_file_output.h:69
object_seal_receipt finish()
Definition profile_file_output.h:131
bool failed() const noexcept
Definition profile_file_output.h:70
void append(std::uint64_t retained, bit_view literal, bit_view value)
Definition profile_file_output.h:80