-
Notifications
You must be signed in to change notification settings - Fork 156
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
Fast mode for testing #392
Comments
How many transactions do you commit during one of those slow tests? |
Just a handful, usually they consist of creating a dummy blockchain containing a block or two, indexing it, and then doing some queries against the index state. |
What's an example of one of these slow tests? I hacked this into my benchmark and am skeptical this is going to help a lot. I think you could use non-durable commits and get most of the speedup: "pre-commit" is after all the writes complete, but before the commit.
|
Good idea! I just switched to An example of a slow test is |
It did speed up that one test when run on its own. However, it doesn't seem to have a meaningful effect on the whole suite:
and it makes a bunch of the integration tests fail with |
Is it representative of the performance of an anonymous map if it's causing errors? i.e. it's not quite doing the same thing, there's a difference in behavior. |
The 8s was for the other tests, so I don't think it included the ones that started failing. I pushed it to the "anon" branch though, so that you can try it out |
If all this will save is a few ms per test, then I think it's safe to close, since there won't be much of an improvement over just using |
Even though redb is quite fast, we have a bunch of tests, and some of them creep up towards the 1-2 second mark, which makes the edit/test/debug loop a little slower than I'd like.
It would be nice if we could use redb with an anonymous mapping for tests, similar to sqlite's
:memory:
mode, which I assume would be much faster.The text was updated successfully, but these errors were encountered: