Skip to content

Commit

Permalink
rename get_log_event_index_by_timestamp to get_log_event_idx_by_times…
Browse files Browse the repository at this point in the history
…tamp
  • Loading branch information
Henry8192 committed Jan 9, 2025
1 parent c400361 commit ca4a616
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/clp_ffi_js/ir/StreamReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ EMSCRIPTEN_BINDINGS(ClpStreamReader) {
.function("decodeRange", &clp_ffi_js::ir::StreamReader::decode_range)
.function(
"getLogEventIndexByTimestamp",
&clp_ffi_js::ir::StreamReader::get_log_event_index_by_timestamp
&clp_ffi_js::ir::StreamReader::get_log_event_idx_by_timestamp
);
}
} // namespace
Expand Down
8 changes: 4 additions & 4 deletions src/clp_ffi_js/ir/StreamReader.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ class StreamReader {
* @return `0` if all log event timestamps are larger than the target.
* @return null if no log event exists in the stream.
*/
[[nodiscard]] virtual auto get_log_event_index_by_timestamp(clp::ir::epoch_time_ms_t timestamp
[[nodiscard]] virtual auto get_log_event_idx_by_timestamp(clp::ir::epoch_time_ms_t timestamp
) -> LogEventIdxTsType = 0;

protected:
Expand Down Expand Up @@ -200,14 +200,14 @@ class StreamReader {
) -> void;

/**
* Templated implementation of `get_log_event_index_by_timestamp`.
* Templated implementation of `get_log_event_idx_by_timestamp`.
*
* @tparam LogEvent
* @param timestamp
* event timestamps are larger than the target. In that case, return the first log event index.
*/
template <GetLogEventIdxInterface LogEvent>
auto generic_get_log_event_index_by_timestamp(
auto generic_get_log_event_idx_by_timestamp(
std::vector<LogEventWithFilterData<LogEvent>> const& log_events,
clp::ir::epoch_time_ms_t timestamp
) -> LogEventIdxTsType;
Expand Down Expand Up @@ -295,7 +295,7 @@ auto StreamReader::generic_filter_log_events(
}

template <GetLogEventIdxInterface LogEvent>
auto StreamReader::generic_get_log_event_index_by_timestamp(
auto StreamReader::generic_get_log_event_idx_by_timestamp(
LogEvents<LogEvent> const& log_events,
clp::ir::epoch_time_ms_t timestamp
) -> LogEventIdxTsType {
Expand Down
4 changes: 2 additions & 2 deletions src/clp_ffi_js/ir/StructuredIrStreamReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,10 @@ auto StructuredIrStreamReader::decode_range(size_t begin_idx, size_t end_idx, bo
);
}

auto StructuredIrStreamReader::get_log_event_index_by_timestamp(
auto StructuredIrStreamReader::get_log_event_idx_by_timestamp(
clp::ir::epoch_time_ms_t const timestamp
) -> LogEventIdxTsType {
return generic_get_log_event_index_by_timestamp<StructuredLogEvent>(
return generic_get_log_event_idx_by_timestamp<StructuredLogEvent>(
*m_deserialized_log_events,
timestamp
);
Expand Down
2 changes: 1 addition & 1 deletion src/clp_ffi_js/ir/StructuredIrStreamReader.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class StructuredIrStreamReader : public StreamReader {
[[nodiscard]] auto decode_range(size_t begin_idx, size_t end_idx, bool use_filter) const
-> DecodedResultsTsType override;

[[nodiscard]] auto get_log_event_index_by_timestamp(clp::ir::epoch_time_ms_t timestamp
[[nodiscard]] auto get_log_event_idx_by_timestamp(clp::ir::epoch_time_ms_t timestamp
) -> LogEventIdxTsType override;

private:
Expand Down
4 changes: 2 additions & 2 deletions src/clp_ffi_js/ir/UnstructuredIrStreamReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,10 @@ auto UnstructuredIrStreamReader::decode_range(size_t begin_idx, size_t end_idx,
);
}

auto UnstructuredIrStreamReader::get_log_event_index_by_timestamp(
auto UnstructuredIrStreamReader::get_log_event_idx_by_timestamp(
clp::ir::epoch_time_ms_t const timestamp
) -> LogEventIdxTsType {
return generic_get_log_event_index_by_timestamp<UnstructuredLogEvent>(
return generic_get_log_event_idx_by_timestamp<UnstructuredLogEvent>(
m_encoded_log_events,
timestamp
);
Expand Down
2 changes: 1 addition & 1 deletion src/clp_ffi_js/ir/UnstructuredIrStreamReader.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class UnstructuredIrStreamReader : public StreamReader {
[[nodiscard]] auto decode_range(size_t begin_idx, size_t end_idx, bool use_filter) const
-> DecodedResultsTsType override;

[[nodiscard]] auto get_log_event_index_by_timestamp(clp::ir::epoch_time_ms_t timestamp
[[nodiscard]] auto get_log_event_idx_by_timestamp(clp::ir::epoch_time_ms_t timestamp
) -> LogEventIdxTsType override;

private:
Expand Down

0 comments on commit ca4a616

Please sign in to comment.