Skip to content

Add dotnet benchmarks - #63

Open
quinchs wants to merge 6 commits into
masterfrom
dotnet-benchmarks
Open

Add dotnet benchmarks#63
quinchs wants to merge 6 commits into
masterfrom
dotnet-benchmarks

Conversation

@quinchs

@quinchs quinchs commented Dec 23, 2022

Copy link
Copy Markdown
Contributor

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

Requires .NET 7 SDK to run

@elprans elprans left a comment

Copy link
Copy Markdown
Member

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

quinchs commented Dec 28, 2022

Copy link
Copy Markdown
Contributor Author

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

@elprans

elprans commented Dec 28, 2022

Copy link
Copy Markdown
Member

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

quinchs commented Dec 28, 2022

Copy link
Copy Markdown
Contributor Author

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

quinchs commented Dec 28, 2022

Copy link
Copy Markdown
Contributor Author

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

@elprans

elprans commented Dec 28, 2022

Copy link
Copy Markdown
Member

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

@quinchs

quinchs commented Dec 28, 2022

Copy link
Copy Markdown
Contributor Author

Is there a quick fix?

@elprans

elprans commented May 19, 2023

Copy link
Copy Markdown
Member

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