-
Notifications
You must be signed in to change notification settings - Fork 591
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
bigquery: add simple benchmarks #2666
Conversation
Benchmarks make various queries and measure 1. how long until we get the first row 2. how long we need to go through all rows
packages/bigquery/benchmark/bench.js
Outdated
|
||
for (queryTxt of queries) { | ||
doQuery(queryTxt); | ||
} |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@callmehiphop PTAL |
packages/bigquery/benchmark/bench.js
Outdated
@@ -0,0 +1,69 @@ | |||
/*! | |||
* Copyright 2014 Google Inc. All Rights Reserved. |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
packages/bigquery/benchmark/bench.js
Outdated
const BigQuery = require('../src/index.js'); | ||
|
||
if (process.argv.length < 3) { | ||
throw util.format("need query file; usage: '%s %s <queries.json>'", process.argv[0], process.argv[1]); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
packages/bigquery/benchmark/bench.js
Outdated
numRows++; | ||
}) | ||
.on('end', function() { | ||
timeTotalMilli = new Date().getTime() - startMilli; |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like our linter is finding some issues, (running npm run lint
from the root directory), but otherwise LGTM.
Out of curiosity do we want to tie this into CI or anything?
@callmehiphop Thank you for all the pointers, PTAL. The long strings look a little weird to me, I'm not sure if this is the node-idiomatic way to do it. As to the CI, eventually I'd like to make this benchmark run in all languages on schedule and auto-publish result to dashboard. It's somewhat resource-intensive so we'll have to run on dedicated machine, etc. I don't know how to do all this yet, so I think we can make it manually-runnable now and defer automation for a little later. WDYT? |
@callmehiphop ping |
So there's good news and bad news. 👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there. 😕 The bad news is that it appears that one or more commits were authored by someone other than the pull request submitter. We need to confirm that they're okay with their commits being contributed to this project. Please have them confirm that here in the pull request. Note to project maintainer: This is a terminal state, meaning the |
@pongad you are right, the strings looked weird. I added a small commit that tried to clean them up and I also ran |
Benchmarks make various queries and measure