Skip to content

Commit

Permalink
revert function name to find_nearest_log_event_by_timestamp
Browse files Browse the repository at this point in the history
  • Loading branch information
Henry8192 committed Feb 3, 2025
1 parent 8c8c42e commit a984d7b
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions src/clp_ffi_js/ir/StreamReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,8 @@ EMSCRIPTEN_BINDINGS(ClpStreamReader) {
.function("deserializeStream", &clp_ffi_js::ir::StreamReader::deserialize_stream)
.function("decodeRange", &clp_ffi_js::ir::StreamReader::decode_range)
.function(
"findNearestLogEventIdxByTimestamp",
&clp_ffi_js::ir::StreamReader::find_nearest_log_event_idx_by_timestamp
"findNearestLogEventByTimestamp",
&clp_ffi_js::ir::StreamReader::find_nearest_log_event_by_timestamp
);
}
} // namespace
Expand Down
10 changes: 5 additions & 5 deletions src/clp_ffi_js/ir/StreamReader.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ class StreamReader {
* @param target_ts
* @return The index of the log event L.
*/
[[nodiscard]] virtual auto find_nearest_log_event_idx_by_timestamp(
[[nodiscard]] virtual auto find_nearest_log_event_by_timestamp(
clp::ir::epoch_time_ms_t target_ts
) -> NullableLogEventIdx = 0;

Expand Down Expand Up @@ -194,15 +194,15 @@ class StreamReader {
) -> void;

/**
* Templated implementation of `find_nearest_log_event_idx_by_timestamp`.
* Templated implementation of `find_nearest_log_event_by_timestamp`.
*
* @tparam LogEvent
* @param log_events
* @param target_ts
* @return See `find_nearest_log_event_idx_by_timestamp`.
* @return See `find_nearest_log_event_by_timestamp`.
*/
template <typename LogEvent>
auto generic_find_nearest_log_event_idx_by_timestamp(
auto generic_find_nearest_log_event_by_timestamp(
LogEvents<LogEvent> const& log_events,
clp::ir::epoch_time_ms_t target_ts
) -> NullableLogEventIdx;
Expand Down Expand Up @@ -294,7 +294,7 @@ auto StreamReader::generic_filter_log_events(
}

template <typename LogEvent>
auto StreamReader::generic_find_nearest_log_event_idx_by_timestamp(
auto StreamReader::generic_find_nearest_log_event_by_timestamp(
LogEvents<LogEvent> const& log_events,
clp::ir::epoch_time_ms_t target_ts
) -> NullableLogEventIdx {
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::find_nearest_log_event_idx_by_timestamp(
auto StructuredIrStreamReader::find_nearest_log_event_by_timestamp(
clp::ir::epoch_time_ms_t const target_ts
) -> NullableLogEventIdx {
return generic_find_nearest_log_event_idx_by_timestamp(*m_deserialized_log_events, target_ts);
return generic_find_nearest_log_event_by_timestamp(*m_deserialized_log_events, target_ts);
}

StructuredIrStreamReader::StructuredIrStreamReader(
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 find_nearest_log_event_idx_by_timestamp(clp::ir::epoch_time_ms_t target_ts
[[nodiscard]] auto find_nearest_log_event_by_timestamp(clp::ir::epoch_time_ms_t target_ts
) -> NullableLogEventIdx 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::find_nearest_log_event_idx_by_timestamp(
auto UnstructuredIrStreamReader::find_nearest_log_event_by_timestamp(
clp::ir::epoch_time_ms_t const target_ts
) -> NullableLogEventIdx {
return generic_find_nearest_log_event_idx_by_timestamp(m_encoded_log_events, target_ts);
return generic_find_nearest_log_event_by_timestamp(m_encoded_log_events, target_ts);
}

UnstructuredIrStreamReader::UnstructuredIrStreamReader(
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 find_nearest_log_event_idx_by_timestamp(clp::ir::epoch_time_ms_t target_ts
[[nodiscard]] auto find_nearest_log_event_by_timestamp(clp::ir::epoch_time_ms_t target_ts
) -> NullableLogEventIdx override;

private:
Expand Down

0 comments on commit a984d7b

Please sign in to comment.