internal/bigquery,vulncheck: only read work version columns

Reading work versions was extremely slow. The reason was that we were
reading the entirety of every row. This CL reads just the columns we
need, giving a huge speedup.

To do this, we needed a way to specify columns in a partition
query. The arguments to the PartitionQuery function were all strings,
so it was already a bit confusing what each string meant, and this was
going to be one more. PartitionQuery is now a struct, so the field
names can be written in the code.

Change-Id: I96205796b0a44220bdd9373332311e210d3176a5
Reviewed-on: https://go-review.googlesource.com/c/pkgsite-metrics/+/474896
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
Reviewed-by: Zvonimir Pavlinovic <zpavlinovic@google.com>
4 files changed
tree: 0d56799d5bc7cf726207d5475247b5dcb7ca602f
  1. cmd/
  2. deploy/
  3. devtools/
  4. internal/
  5. terraform/
  6. .dockerignore
  7. .gitignore
  8. all_test.go
  9. checks.bash
  10. config.json.commented
  11. CONTRIBUTING.md
  12. go.mod
  13. go.sum
  14. LICENSE
  15. Makefile
  16. PATENTS
  17. README.md
  18. tools_test.go
README.md

pkgsite-metrics

This repository contains code that serves pkg.go.dev/metrics.

Report Issues / Send Patches

This repository uses Gerrit for code changes. To learn how to submit changes to this repository, see https://golang.org/doc/contribute.html.

The main issue tracker for the time repository is located at https://github.com/golang/go/issues. Prefix your issue with “x/pkgsite-metrics:” in the subject line, so it is easy to find.