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

fix: add a benchmark tests option #162

Merged
merged 5 commits into from
Nov 13, 2021
Merged

Conversation

noob20000405
Copy link
Contributor

@noob20000405 noob20000405 commented Nov 2, 2021

Fix: #155

Description

I moved all intensive benchmark tests functions like *Medium() and *Large() to some new files called *_inten.cpp. And added an option for intensive tests in the CMake file.

To do intensive tests, we need to use command cmake .. -DINTENSIVE_BENCHMARK=ON to switch on it.

Signed-off-by: noob20000405 <vincent4869code@gmail.com>
Signed-off-by: noob20000405 <vincent4869code@gmail.com>
@casbin-bot
Copy link
Member

@EmperorYP7 @divy9881 @sheny1xuan please review

@noob20000405 noob20000405 changed the title Fix: add a benchmark tests option fix: add a benchmark tests option Nov 2, 2021
Signed-off-by: noob20000405 <vincent4869code@gmail.com>
@noob20000405
Copy link
Contributor Author

@sheny1xuan @EmperorYP7 I didn't use macro but I think it meets your suggestion, if not, please give me some instructions. Thank you in advance ;))

@@ -14,6 +14,8 @@

add_definitions(-DCASBIN_PROJECT_DIR=${CMAKE_SOURCE_DIR})

option(INTENSIVE_BENCHMARK OFF)
Copy link
Contributor

@sheny1xuan sheny1xuan Nov 3, 2021

Choose a reason for hiding this comment

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

Good job. Maybe adding a commet like that is better.

option(CASBIN_BUILD_TEST "State whether to build test" ON)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I followed your suggestion, please review again. Thanks.

@hsluoyz
Copy link
Member

hsluoyz commented Nov 3, 2021

@noob20000405 please do not raise new PRs for the same issue. You can always re-use the existing PR for doing anything: reworking commits, appending commits, etc.

@hsluoyz
Copy link
Member

hsluoyz commented Nov 3, 2021

@EmperorYP7 plz review

Signed-off-by: noob20000405 <vincent4869code@gmail.com>
Signed-off-by: noob20000405 <vincent4869code@gmail.com>
Copy link
Contributor

@sheny1xuan sheny1xuan left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Member

@EmperorYP7 EmperorYP7 left a comment

Choose a reason for hiding this comment

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

LGTM!

@EmperorYP7 EmperorYP7 merged commit 7790669 into casbin:master Nov 13, 2021
@github-actions
Copy link

🎉 This PR is included in version 1.39.6 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

Don't run benchmark tests in CI to avoid error
5 participants