iavl
iavl copied to clipboard
ci: Enable benchmarks in Github Actions
Automates one run of the iavl benchmarks, and does so with each commit.
It also removes old benchmark records, that are likely no longer relevant, as well as the setup script for those benchmarks.
@robert-zaremba hey, I ended up finding the benchmarking issue that you described.
Indeed, they do not run "stock".
Since this is an important library, I think that these changes should fix benchmarks. Basically just explicitly installed clang and gcc here:
https://github.com/notional-labs/containers/blob/1bbdb5894ac2d293651a2bffeefa831de0eb8448/cosmos/Dockerfile#L9
We're missing some kind of pthread support header.
turns out "reinstall glibc" does it.
@odeke-em how do we make gobencher work. This should already be handled no?
Not sure, but I can check that out
Latest commit - since we run the benchmarks in CI, there's not really a need to have the results kept here, ci will keep those for us.
@marbar3778 yup, bencher already runs with every commit on this repository, please see https://dashboard.bencher.orijtech.com/?repo=cosmos%2Fiavl but seems like something inside iavl ain't properly running right cc @kirbyquerby
@odeke-em hi :D
so, I think that this is .... wierd. Where could I see the gobencher config?
If I had to guess, it's not being built quite right.
bench:
cd benchmarks && \
go test $(LDFLAGS) -tags cleveldb,rocksdb,pebbledb -run=NOTEST -bench=Small . && \
go test $(LDFLAGS) -tags cleveldb,rocksdb,pebbledb -run=NOTEST -bench=Medium . && \
go test $(LDFLAGS) -run=NOTEST -bench=RandomBytes .
.PHONY: bench
in order to run the tests, you'll want to build with the different tags.
go bencher is now fixed, we should opt to only use that. no need to duplicate jobs
How do I see what gobencher produces?
This is globally visible
Found the link....
@odeke-em hi!
Is it possible to run gobencher benchmarks in a container?
One of the things that this PR does is it uses a tightly defined environment where all of the db's work.
RIght now I can see that gobencher is working only for goleveldb and rocksdb-- or I am using it wrong, here's where I'm viewing results:
https://dashboard.bencher.orijtech.com/graphs?repo=https%3A%2F%2Fgithub.com%2Fcosmos%2Fiavl.git
thanks!
If the gobencher works then I prefer much more gobencher approach. It gives us diff, and won't consume github cycles.
question:
We are spending on these ci jobs?
Who is spending-- and then also maybe, why are we spending?
Vast majority of github ci is afaik free.
Thanks
no limit CI is not for free. I'm not sure if we are currently in a free tier for IAVL. For Cosmos-SDK, we are in a paid plan. But with benchamarks enabled in CI then it will be more complicated.
I get unlimited CI for free.
anyhow no worries and I still have no idea who's paying for it
The real issue at this point is that we need to make gobencher test pebble and rocks and cleveldb not just goleveldb.
@odeke-em how do we run govencher with other dbs?
ah nvm we should actually run this to make sure they pass