Skip to content

Bench mark for multi languages. #459

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open

Bench mark for multi languages. #459

wants to merge 3 commits into from

Conversation

ColinLeeo
Copy link
Contributor

No description provided.

@ColinLeeo ColinLeeo marked this pull request as draft April 10, 2025 10:04
@ColinLeeo ColinLeeo force-pushed the bench_mark branch 2 times, most recently from ab71a21 to 99ea5e4 Compare April 17, 2025 07:44
@ColinLeeo ColinLeeo marked this pull request as ready for review April 17, 2025 09:37
@ColinLeeo ColinLeeo requested a review from Copilot April 17, 2025 11:22
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces benchmark support for multi-language implementations (C and C++) while updating several core APIs in the TSFile I/O and meta index handling. Key changes include refactoring function signatures to use smart pointers for meta index entry parameters, modifying device and measurement metadata interfaces, and adding new benchmark modules for both C and C++.

Reviewed Changes

Copilot reviewed 28 out of 32 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
cpp/src/file/tsfile_io_reader.{h,cc} Updated function signatures to use shared_ptr and method calls for offsets; adjusted error-handling in deserialization.
cpp/src/encoding/gorilla_decoder.h Changed the initial value of has_next_ from true to false.
cpp/src/common/tsfile_common.{h,cc} Transitioned get_offset to a pure virtual and updated clone implementations.
cpp/src/common/tablet.cc Modified get_device_id to reserve capacity and pass an internal flag.
cpp/src/common/schema.h Updated the default compression assignment to use the proper utility function.
cpp/src/common/device_id.h Enhanced StringArrayDeviceID with a new constructor and revised equality operator.
cpp/bench_mark/* Added new benchmark source files for C and C++ implementations and corresponding configuration changes.
Files not reviewed (4)
  • cpp/CMakeLists.txt: Language not supported
  • cpp/bench_mark/CMakeLists.txt: Language not supported
  • cpp/bench_mark/bench_mark_src/CMakeLists.txt: Language not supported
  • cpp/bench_mark/build.sh: Language not supported
Comments suppressed due to low confidence (2)

cpp/src/encoding/gorilla_decoder.h:47

  • Changing the initial value of 'has_next_' from true to false alters the decoder's iteration behavior; please verify that this new initialization correctly reflects the intended logic.
has_next_ = false;

cpp/src/common/tablet.cc:343

  • [nitpick] Passing 'true' as the second argument to StringArrayDeviceID indicates a change in internal behavior; verify that this new flag does not adversely affect device ID equality or serialization.
return std::make_shared<StringArrayDeviceID>(id_array, true);

Comment on lines +398 to 399
ret = device_meta_index->device_deserialize_from(data_buf, read_size);
return ret;
Copy link
Preview

Copilot AI Apr 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing the explicit error check for the deserialization method may lead to silent failures; consider handling the error return value of 'device_deserialize_from' explicitly.

Suggested change
ret = device_meta_index->device_deserialize_from(data_buf, read_size);
return ret;
ret = device_meta_index->device_deserialize_from(data_buf, read_size);
if (RET_FAIL(ret)) {
return ret;
}

Copilot uses AI. Check for mistakes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant