Skip to content
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

cleanup benchmark #4233

Merged
merged 22 commits into from
Mar 16, 2022
Merged

Conversation

guo-shaoge
Copy link
Contributor

@guo-shaoge guo-shaoge commented Mar 11, 2022

Signed-off-by: guo-shaoge [email protected]

What problem does this PR solve?

Issue Number: close #4232

Problem Summary:

  1. bench_function_least.cpp use some duplicated code(executeFunction), I didn't notice that in expression: support least/greatest for int/real. #3801.

  2. Also there are two main functions for benchmark, one is in bench_function_cast.cpp another one is in bench_function_least.cpp, which cause compilation error:

CMakeFiles/bench_dbms.dir/src/Functions/tests/bench_function_least.cpp.o: In function `main':
bench_function_least.cpp:(.text.startup+0x0): multiple definition of `main'
CMakeFiles/bench_dbms.dir/src/Functions/tests/bench_function_cast.cpp.o:bench_function_cast.cpp:(.text.startup+0x0): first defined here
collect2: error: ld returned 1 exit status

What is changed and how it works?

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

None

@ti-chi-bot
Copy link
Member

ti-chi-bot commented Mar 11, 2022

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • JaySon-Huang
  • fuzhe1989

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@ti-chi-bot ti-chi-bot added release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Mar 11, 2022
Signed-off-by: guo-shaoge <[email protected]>
@@ -23,6 +23,7 @@ PageDirectoryPtr PageDirectoryFactory::create(FileProviderPtr & file_provider, P
PageDirectoryPtr PageDirectoryFactory::createFromEdit(FileProviderPtr & file_provider, PSDiskDelegatorPtr & delegator, const PageEntriesEdit & edit)
{
auto [wal, reader] = WALStore::create(file_provider, delegator);
(void)reader;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

To fix compilation error.

@@ -223,6 +223,7 @@ TEST_F(WALStoreTest, Empty)
while (reader->remained())
{
auto [ok, edit] = reader->next();
(void)edit;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

To fix compilation error.

@guo-shaoge guo-shaoge requested a review from fuzhe1989 March 11, 2022 12:49
Signed-off-by: guo-shaoge <[email protected]>
@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Mar 11, 2022
@fuzhe1989 fuzhe1989 requested a review from XuHuaiyu March 11, 2022 15:10
@ti-chi-bot ti-chi-bot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Mar 12, 2022
@JaySon-Huang
Copy link
Contributor

/merge

@ti-chi-bot
Copy link
Member

@JaySon-Huang: It seems you want to merge this PR, I will help you trigger all the tests:

/run-all-tests

You only need to trigger /merge once, and if the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes.

If you have any questions about the PR merge process, please refer to pr process.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository.

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

Commit hash: 59d234e

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Mar 12, 2022
@JaySon-Huang
Copy link
Contributor

/run-unit-test

@guo-shaoge
Copy link
Contributor Author

/run-ntegration-test
/run-unit-test

@guo-shaoge
Copy link
Contributor Author

/rebuild

1 similar comment
@guo-shaoge
Copy link
Contributor Author

/rebuild

@SchrodingerZhu
Copy link
Contributor

/rebuild
/run-all-tests

@SchrodingerZhu
Copy link
Contributor

/run-all-tests

@guo-shaoge
Copy link
Contributor Author

/hold

Still have compilation error. Trying to fix it.

@guo-shaoge
Copy link
Contributor Author

/run-all-tests

Comment on lines 10 to 11
target_link_libraries(test_util_bench_main dbms gtest_main)
target_include_directories(test_util_bench_main BEFORE PUBLIC ${benchmark_SOURCE_DIR}/include)
Copy link
Contributor

@JaySon-Huang JaySon-Huang Mar 15, 2022

Choose a reason for hiding this comment

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

Suggested change
target_link_libraries(test_util_bench_main dbms gtest_main)
target_include_directories(test_util_bench_main BEFORE PUBLIC ${benchmark_SOURCE_DIR}/include)
target_link_libraries(test_util_bench_main dbms benchmark)

You can try this

@ti-chi-bot ti-chi-bot removed the status/can-merge Indicates a PR has been approved by a committer. label Mar 15, 2022
@guo-shaoge
Copy link
Contributor Author

/run-unit-test

@guo-shaoge
Copy link
Contributor Author

/run-unit-test

@guo-shaoge
Copy link
Contributor Author

/run-integration-test

@sre-bot
Copy link
Collaborator

sre-bot commented Mar 16, 2022

Coverage for changed files

Filename                                       Regions    Missed Regions     Cover   Functions  Missed Functions  Executed       Lines      Missed Lines     Cover    Branches   Missed Branches     Cover
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Common/TiFlashMetrics.h                             18                 0   100.00%          11                 0   100.00%          47                 1    97.87%           8                 0   100.00%
Flash/Coprocessor/DAGUtils.cpp                     290               233    19.66%          36                24    33.33%         505               404    20.00%         324               230    29.01%
Flash/EstablishCall.h                                2                 2     0.00%           2                 2     0.00%           2                 2     0.00%           0                 0         -
Flash/Mpp/MPPTunnel.cpp                            185               185     0.00%          16                16     0.00%         241               241     0.00%          94                94     0.00%
Flash/Mpp/MPPTunnel.h                                9                 9     0.00%           9                 9     0.00%          18                18     0.00%           0                 0         -
Functions/FunctionsDateTime.cpp                     27                19    29.63%           4                 2    50.00%          99                25    74.75%          16                13    18.75%
Functions/FunctionsDateTime.h                     1073               638    40.54%         322               209    35.09%        2018              1226    39.25%         534               340    36.33%
Functions/tests/gtest_dayofweekyear.cpp            258                74    71.32%           2                 0   100.00%         135                 0   100.00%          80                42    47.50%
Storages/Page/V3/WAL/WALReader.cpp                  72                10    86.11%           9                 0   100.00%         176                15    91.48%          54                14    74.07%
Storages/Page/V3/WALStore.cpp                       74                39    47.30%           8                 1    87.50%         134                42    68.66%          36                19    47.22%
Storages/Page/V3/WALStore.h                          1                 0   100.00%           1                 0   100.00%           3                 0   100.00%           0                 0         -
Storages/Page/V3/tests/gtest_wal_store.cpp        1948               260    86.65%          12                 0   100.00%         465                13    97.20%         646               314    51.39%
Storages/tests/TiFlashStorageTestBasic.h            27                 5    81.48%           6                 0   100.00%          51                12    76.47%          18                 9    50.00%
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                                             3984              1474    63.00%         438               263    39.95%        3894              1999    48.66%        1810              1075    40.61%

Coverage summary

Functions  MissedFunctions  Executed  Lines   MissedLines  Cover
16931      9506             43.85%    190876  96500        49.44%

full coverage report (for internal network access only)

@guo-shaoge
Copy link
Contributor Author

/merge

@ti-chi-bot
Copy link
Member

@guo-shaoge: It seems you want to merge this PR, I will help you trigger all the tests:

/run-all-tests

You only need to trigger /merge once, and if the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes.

If you have any questions about the PR merge process, please refer to pr process.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository.

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

Commit hash: 56acd2a

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Mar 16, 2022
@sre-bot
Copy link
Collaborator

sre-bot commented Mar 16, 2022

Coverage for changed files

Filename                                                Regions    Missed Regions     Cover   Functions  Missed Functions  Executed       Lines      Missed Lines     Cover    Branches   Missed Branches     Cover
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Common/TiFlashMetrics.h                                      18                 0   100.00%          11                 0   100.00%          47                 1    97.87%           8                 0   100.00%
DataStreams/HashJoinProbeBlockInputStream.cpp                15                15     0.00%           4                 4     0.00%          28                28     0.00%          10                10     0.00%
DataStreams/HashJoinProbeBlockInputStream.h                   1                 1     0.00%           1                 1     0.00%           1                 1     0.00%           0                 0         -
DataStreams/ParallelAggregatingBlockInputStream.cpp          93                93     0.00%          12                12     0.00%         150               150     0.00%          64                64     0.00%
DataStreams/ParallelAggregatingBlockInputStream.h             6                 6     0.00%           6                 6     0.00%          14                14     0.00%           0                 0         -
Flash/Coprocessor/DAGQueryBlockInterpreter.cpp              390               390     0.00%          45                45     0.00%         875               875     0.00%         312               312     0.00%
Flash/Coprocessor/DAGUtils.cpp                              290               233    19.66%          36                24    33.33%         505               404    20.00%         324               230    29.01%
Flash/EstablishCall.h                                         2                 2     0.00%           2                 2     0.00%           2                 2     0.00%           0                 0         -
Flash/Mpp/MPPTunnel.cpp                                     185               185     0.00%          16                16     0.00%         241               241     0.00%          94                94     0.00%
Flash/Mpp/MPPTunnel.h                                         9                 9     0.00%           9                 9     0.00%          18                18     0.00%           0                 0         -
Functions/FunctionsDateTime.cpp                              27                19    29.63%           4                 2    50.00%          99                25    74.75%          16                13    18.75%
Functions/FunctionsDateTime.h                              1073               638    40.54%         322               209    35.09%        2018              1226    39.25%         534               340    36.33%
Functions/tests/gtest_dayofweekyear.cpp                     258                74    71.32%           2                 0   100.00%         135                 0   100.00%          80                42    47.50%
Storages/Page/V3/WAL/WALReader.cpp                           72                10    86.11%           9                 0   100.00%         176                15    91.48%          54                14    74.07%
Storages/Page/V3/WALStore.cpp                                74                39    47.30%           8                 1    87.50%         134                42    68.66%          36                19    47.22%
Storages/Page/V3/WALStore.h                                   1                 0   100.00%           1                 0   100.00%           3                 0   100.00%           0                 0         -
Storages/Page/V3/tests/gtest_wal_store.cpp                 1948               260    86.65%          12                 0   100.00%         465                13    97.20%         646               314    51.39%
Storages/tests/TiFlashStorageTestBasic.h                     27                 5    81.48%           6                 0   100.00%          51                12    76.47%          18                 9    50.00%
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                                                      4489              1979    55.91%         506               331    34.58%        4962              3067    38.19%        2196              1461    33.47%

Coverage summary

Functions  MissedFunctions  Executed  Lines   MissedLines  Cover
16936      9510             43.85%    190908  96529        49.44%

full coverage report (for internal network access only)

@sre-bot
Copy link
Collaborator

sre-bot commented Mar 16, 2022

Coverage for changed files

too many lines from llvm-cov, please refer to full report instead

Coverage summary

Functions  MissedFunctions  Executed  Lines   MissedLines  Cover
16936      9510             43.85%    190910  96538        49.43%

full coverage report (for internal network access only)

@sre-bot
Copy link
Collaborator

sre-bot commented Mar 16, 2022

Coverage for changed files

too many lines from llvm-cov, please refer to full report instead

Coverage summary

Functions  MissedFunctions  Executed  Lines   MissedLines  Cover
16967      9541             43.77%    191174  96794        49.37%

full coverage report (for internal network access only)

@sre-bot
Copy link
Collaborator

sre-bot commented Mar 16, 2022

Coverage for changed files

too many lines from llvm-cov, please refer to full report instead

Coverage summary

Functions  MissedFunctions  Executed  Lines   MissedLines  Cover
16967      9541             43.77%    191116  96788        49.36%

full coverage report (for internal network access only)

@ti-chi-bot ti-chi-bot merged commit 0f6f7e2 into pingcap:master Mar 16, 2022
@JaySon-Huang JaySon-Huang deleted the fix_bench_compiler_error branch March 17, 2022 00:32
JaySon-Huang pushed a commit to JaySon-Huang/tiflash that referenced this pull request Mar 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cleanup benchmark
6 participants