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

Sqlite benchmark: Use a file-based DB #348

Merged
merged 1 commit into from
Jun 5, 2019
Merged

Conversation

rvl
Copy link
Contributor

@rvl rvl commented Jun 4, 2019

Relates to #154

Comments

Using the SQLite in-memory database might not be realistic enough. For example, I noticed a big difference between file and memory DBs for the SeqState benchmark.

So just use a file database in /tmp/bench12345-1.db.

@rvl rvl self-assigned this Jun 4, 2019
@iohk-bors iohk-bors bot closed this Jun 4, 2019
@KtorZ KtorZ reopened this Jun 4, 2019
@KtorZ KtorZ changed the base branch from rvl/154/repsert to rvl/154/db-bench June 4, 2019 07:41
, fmt
, memory
, temporary
Copy link
Member

Choose a reason for hiding this comment

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

Note that there's no need for an extra dependency here, we already have what we need from the base package:

https://hackage.haskell.org/package/base-4.11.1.0/docs/System-IO.html#v:openTempFile

Or am I missing something 🤔 ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

openTempFile needs to be given a directory for the file. It's usually /tmp on Linux, but there are environment variables that control it. On Windows and MacOS, who knows what it might be. And we are going to want to run our database tests on these platforms.

withSystemTempFile and friends find the system temp directory for you.

@KtorZ KtorZ force-pushed the rvl/154/db-bench branch 2 times, most recently from 97c88df to 34c23eb Compare June 4, 2019 16:58
@iohk-bors iohk-bors bot closed this Jun 4, 2019
@KtorZ KtorZ reopened this Jun 4, 2019
@rvl rvl changed the base branch from rvl/154/db-bench to master June 4, 2019 22:50
@KtorZ KtorZ merged commit 5e809e0 into master Jun 5, 2019
@iohk-bors iohk-bors bot deleted the rvl/154/bench-db-file branch June 5, 2019 15:16
This pull request was closed.
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.

3 participants