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

Add dotnet benchmarks #63

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Add dotnet benchmarks #63

wants to merge 6 commits into from

Conversation

quinchs
Copy link
Contributor

@quinchs quinchs commented Dec 23, 2022

Adds both edgedb_dotnet and efcore (most popular .NET ORM) as a benchmark target.

Requires .NET 7 SDK to run

Copy link
Member

@elprans elprans left a comment

Choose a reason for hiding this comment

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

Please add running instructions to DEVELOP.rst.

@quinchs quinchs requested a review from elprans December 27, 2022 21:45
@quinchs
Copy link
Contributor Author

quinchs commented Dec 28, 2022

@elprans can you run the benchmarks on the same machine as the others and commit the results?

@elprans
Copy link
Member

elprans commented Dec 28, 2022

Hm. I'm actually getting an error:

Exception in edgedb_dotnet.get_movie: InvalidValueError: invalid input to mean(): not enough elements in input set

@quinchs
Copy link
Contributor Author

quinchs commented Dec 28, 2022

Exception in edgedb_dotnet.get_movie: InvalidValueError: invalid input to mean(): not enough elements in input set

That error format looks like it was from an ErrorResponse message meaning it was thrown in edgedb itself.

Pulling the movie id it was trying to select and running the query in the CLI throws the same error on my end:

edgedb> SELECT Movie {
.......     id,
.......     image,
.......     title,
.......     year,
.......     description,
.......     avg_rating,
.......     directors: {
.......         id,
.......         full_name,
.......         image,
.......     }
.......     ORDER BY Movie.directors@list_order EMPTY LAST
.......         THEN Movie.directors.last_name,
.......     cast: {
.......         id,
.......         full_name,
.......         image,
.......     }
.......     ORDER BY Movie.cast@list_order EMPTY LAST
.......         THEN Movie.cast.last_name,
.......     reviews := (
.......         SELECT Movie.<movie[IS Review] {
.......             id,
.......             body,
.......             rating,
.......             author: {
.......                 id,
.......                 name,
.......                 image,
.......             }
.......         }
.......         ORDER BY .creation_time DESC
.......     ),
....... }
....... FILTER .id = <uuid>$id;
Parameter <uuid>$id: 5841f480-862b-11ed-be8c-83ddd150e3f2
edgedb error: InvalidValueError: invalid input to mean(): not enough elements in input set

Is this a bug with EdgeDB?

@quinchs
Copy link
Contributor Author

quinchs commented Dec 28, 2022

I've pushed a change to log the ids that are used when an error is thrown

@elprans
Copy link
Member

elprans commented Dec 28, 2022

This seems to be an issue with the data set. There should be at least one review for each movie.

@quinchs
Copy link
Contributor Author

quinchs commented Dec 28, 2022

Is there a quick fix?

@elprans
Copy link
Member

elprans commented May 19, 2023

I looked at this again, and the only diff I can see from other benchmarks is that you are not selecting the ids randomly and instead just take the first slice, which somehow contains problematic data. Randomize id selection to see if we can get a successful run.

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.

2 participants