You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2021/08/25 12:38:12 UTC

[GitHub] [incubator-doris] BiteTheDDDDt opened a new pull request #6506: [Feature] Support for storage layer benchmark

BiteTheDDDDt opened a new pull request #6506:
URL: https://github.com/apache/incubator-doris/pull/6506


   ## Proposed changes
   
   like here  #6505
   
   ## Types of changes
   
   What types of changes does your code introduce to Doris?
   _Put an `x` in the boxes that apply_
   
   - [ ] Bugfix (non-breaking change which fixes an issue)
   - [X] New feature (non-breaking change which adds functionality)
   - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
   - [ ] Documentation Update (if none of the other choices apply)
   - [ ] Code refactor (Modify the code structure, format the code, etc...)
   - [ ] Optimization. Including functional usability improvements and performance improvements.
   - [X] Dependency. Such as changes related to third-party components.
   - [ ] Other.
   
   ## Checklist
   
   _Put an `x` in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code._
   
   - [X] I have created an issue on (Fix #ISSUE) and described the bug/feature there in detail
   - [ ] Compiling and unit tests pass locally with my changes
   - [ ] I have added tests that prove my fix is effective or that my feature works
   - [ ] If these changes need document changes, I have updated the document
   - [X] Any dependent changes have been merged
   
   ## Further comments
   
   If this is a relatively large or complex change, kick off the discussion at dev@doris.apache.org by explaining why you chose the solution you did and what alternatives you considered, etc...
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] yangzhg commented on a change in pull request #6506: [Feature] Support for storage layer benchmark

Posted by GitBox <gi...@apache.org>.
yangzhg commented on a change in pull request #6506:
URL: https://github.com/apache/incubator-doris/pull/6506#discussion_r696238986



##########
File path: be/test/test_util/test_util.cpp
##########
@@ -74,4 +73,42 @@ void InitConfig() {
     }
 }
 
+std::vector<std::string> split_str(const std::string& str, char separation) {

Review comment:
       use strings::Split




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] BiteTheDDDDt commented on pull request #6506: [Feature] Support for storage layer benchmark

Posted by GitBox <gi...@apache.org>.
BiteTheDDDDt commented on pull request #6506:
URL: https://github.com/apache/incubator-doris/pull/6506#issuecomment-906071636


   @yangzhg I do some change to fix those problems


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] yangzhg merged pull request #6506: [Feature] Support for storage layer benchmark

Posted by GitBox <gi...@apache.org>.
yangzhg merged pull request #6506:
URL: https://github.com/apache/incubator-doris/pull/6506


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] yangzhg commented on a change in pull request #6506: [Feature] Support for storage layer benchmark

Posted by GitBox <gi...@apache.org>.
yangzhg commented on a change in pull request #6506:
URL: https://github.com/apache/incubator-doris/pull/6506#discussion_r696238029



##########
File path: be/test/olap/tablet_schema_helper.h
##########
@@ -123,4 +123,28 @@ void set_column_value_by_type(FieldType fieldType, int src, char* target, MemPoo
     }
 }
 
+void set_column_value_by_type(FieldType fieldType, std::string src, char* target, MemPool* pool,
+                              size_t _length = 0) {
+    if (fieldType == OLAP_FIELD_TYPE_CHAR) {
+        char* src_value = &src[0];

Review comment:
       use src.data() or use src.copy() at line 135 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] github-actions[bot] commented on pull request #6506: [Feature] Support for storage layer benchmark

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #6506:
URL: https://github.com/apache/incubator-doris/pull/6506#issuecomment-909876498






-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] yangzhg commented on a change in pull request #6506: [Feature] Support for storage layer benchmark

Posted by GitBox <gi...@apache.org>.
yangzhg commented on a change in pull request #6506:
URL: https://github.com/apache/incubator-doris/pull/6506#discussion_r696252709



##########
File path: thirdparty/build-thirdparty.sh
##########
@@ -914,6 +914,25 @@ build_hdfs3() {
     make -j $PARALLEL && make install
 }
 
+# benchmark
+build_benchmark() {
+    check_if_source_exist $BENCHMARK_SOURCE
+
+    cd $TP_SOURCE_DIR/$BENCHMARK_SOURCE
+
+    sed -i '160 i  \ \ add_cxx_compiler_flag(-lresolv)' ./CMakeLists.txt
+    sed -i '160 i  \ \ add_cxx_compiler_flag(-pthread)' ./CMakeLists.txt
+    sed -i '160 i  \ \ add_cxx_compiler_flag(-lrt)' ./CMakeLists.txt
+
+    cmake -E make_directory "build"
+    cmake -E chdir "build" cmake -DBENCHMARK_DOWNLOAD_DEPENDENCIES=on -DCMAKE_BUILD_TYPE=Release ../

Review comment:
       ```suggestion
       CXXFLAGS="-lresolv -pthread -lrt" cmake -E chdir "build" cmake -DBENCHMARK_DOWNLOAD_DEPENDENCIES=on -DCMAKE_BUILD_TYPE=Release ../
   ```




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] github-actions[bot] commented on pull request #6506: [Feature] Support for storage layer benchmark

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #6506:
URL: https://github.com/apache/incubator-doris/pull/6506#issuecomment-909876498






-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] yangzhg commented on a change in pull request #6506: [Feature] Support for storage layer benchmark

Posted by GitBox <gi...@apache.org>.
yangzhg commented on a change in pull request #6506:
URL: https://github.com/apache/incubator-doris/pull/6506#discussion_r696252841



##########
File path: thirdparty/build-thirdparty.sh
##########
@@ -914,6 +914,25 @@ build_hdfs3() {
     make -j $PARALLEL && make install
 }
 
+# benchmark
+build_benchmark() {
+    check_if_source_exist $BENCHMARK_SOURCE
+
+    cd $TP_SOURCE_DIR/$BENCHMARK_SOURCE
+
+    sed -i '160 i  \ \ add_cxx_compiler_flag(-lresolv)' ./CMakeLists.txt
+    sed -i '160 i  \ \ add_cxx_compiler_flag(-pthread)' ./CMakeLists.txt
+    sed -i '160 i  \ \ add_cxx_compiler_flag(-lrt)' ./CMakeLists.txt

Review comment:
       remove those sed




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] yangzhg commented on a change in pull request #6506: [Feature] Support for storage layer benchmark

Posted by GitBox <gi...@apache.org>.
yangzhg commented on a change in pull request #6506:
URL: https://github.com/apache/incubator-doris/pull/6506#discussion_r696237768



##########
File path: be/test/olap/tablet_schema_helper.h
##########
@@ -123,4 +123,28 @@ void set_column_value_by_type(FieldType fieldType, int src, char* target, MemPoo
     }
 }
 
+void set_column_value_by_type(FieldType fieldType, std::string src, char* target, MemPool* pool,
+                              size_t _length = 0) {
+    if (fieldType == OLAP_FIELD_TYPE_CHAR) {
+        char* src_value = &src[0];
+        int src_len = src.size();
+
+        auto* dest_slice = (Slice*)target;
+        dest_slice->size = _length;
+        dest_slice->data = (char*)pool->allocate(dest_slice->size);
+        memcpy(dest_slice->data, src_value, src_len);
+        memset(dest_slice->data + src_len, 0, dest_slice->size - src_len);
+    } else if (fieldType == OLAP_FIELD_TYPE_VARCHAR) {
+        char* src_value = &src[0];
+        int src_len = src.size();
+
+        auto* dest_slice = (Slice*)target;
+        dest_slice->size = src_len;
+        dest_slice->data = (char*)pool->allocate(src_len);

Review comment:
       add String type




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] yangzhg commented on a change in pull request #6506: [Feature] Support for storage layer benchmark

Posted by GitBox <gi...@apache.org>.
yangzhg commented on a change in pull request #6506:
URL: https://github.com/apache/incubator-doris/pull/6506#discussion_r696238133



##########
File path: be/test/olap/tablet_schema_helper.h
##########
@@ -123,4 +123,28 @@ void set_column_value_by_type(FieldType fieldType, int src, char* target, MemPoo
     }
 }
 
+void set_column_value_by_type(FieldType fieldType, std::string src, char* target, MemPool* pool,

Review comment:
       ```suggestion
   void set_column_value_by_type(FieldType fieldType, const std::string& src, char* target, MemPool* pool,
   ```




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org