# Trying PkgBenchmark.jl again

**URL:** https://discourse.julialang.org/t/trying-pkgbenchmark-jl-again/7429
**Category:** Performance
**Tags:** question, benchmark
**Created:** [December 1, 2017, 3:27am UTC](https://discourse.julialang.org/t/trying-pkgbenchmark-jl-again/7429 "2017-12-01T03:27:57Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![juliohm](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/juliohm/32/215266_2.png) [@juliohm](https://discourse.julialang.org/u/juliohm)
#### Post date: [December 1, 2017, 3:27am UTC](https://discourse.julialang.org/t/trying-pkgbenchmark-jl-again/7429/1 "2017-12-01T03:27:57Z")

</div>

I got to a point where I need to keep track of performance improvements in my packages, specially with new releases of Julia coming up. The PkgBenchmark.jl package proposes a nice interface similar to Base.Test for benchmarking packages against old commits in the history of the project. The idea is really cool, but [my attempts](https://github.com/JuliaCI/PkgBenchmark.jl/issues/16) to use it are always unsuccessful 😥

I have updated the benchmark code for the latest release of my package:

```julia
using GeoStats
using PkgBenchmark

srand(2017)

datadir = joinpath(@ __DIR__ ,"data")

fname = joinpath(datadir,"permeability.csv")
geodata = readtable(fname, coordnames=[:x,:y])
domain = bounding_grid(geodata, [100,100])
problem = EstimationProblem(geodata, domain, :permeability)

@benchgroup "Kriging" ["solvers"] begin
  solver₁ = Kriging(:permeability => @NT(variogram=ExponentialVariogram(range=40.)))
  solver₂ = Kriging(:permeability => @NT(variogram=SphericalVariogram(range=40.)))

  @bench "Exponential variogram" solve($problem, solver₁)
end

```

I then open the Julia prompt and type:

```julia
using PkgBenchmark

results = benchmarkpkg("GeoStats")

```

The benchmarks apparently did run, but the results object doesn’t seem to contain information? I went ahead and tried to benchmark against an old tagged version:

```julia
judge("GeoStats", "v0.4.4")

```

and it again prints an empty object without information? Anyone with experience can explain what is happening and what needs to be done to get the benchmark working?

---

<div class="post-metadata">

### Author: ![cormullion](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cormullion/32/49131_2.png) [@cormullion](https://discourse.julialang.org/u/cormullion)
#### Post date: [December 1, 2017, 10:25am UTC](https://discourse.julialang.org/t/trying-pkgbenchmark-jl-again/7429/2 "2017-12-01T10:25:14Z")

</div>

I read “- `ref` optional, the commit to judge” as requiring a commit hash rather than a version, but I might be wrong.

---

<div class="post-metadata">

### Author: ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)
#### Post date: [December 1, 2017, 11:18am UTC](https://discourse.julialang.org/t/trying-pkgbenchmark-jl-again/7429/3 "2017-12-01T11:18:36Z")

</div>

`ref` can be a commit, branch or version. With [https://github.com/JuliaCI/PkgBenchmark.jl/pull/51](https://github.com/JuliaCI/PkgBenchmark.jl/pull/51) here is what I get.

[https://asciinema.org/a/lIkXtQuUawZDJuGvZUBV7z7KF](https://asciinema.org/a/lIkXtQuUawZDJuGvZUBV7z7KF)

Seems to work fine.

---

<div class="post-metadata">

### Author: ![cormullion](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cormullion/32/49131_2.png) [@cormullion](https://discourse.julialang.org/u/cormullion)
#### Post date: [December 1, 2017, 11:52am UTC](https://discourse.julialang.org/t/trying-pkgbenchmark-jl-again/7429/4 "2017-12-01T11:52:03Z")

</div>

Nice! Worth adding to the docs… Which version is that? (current release is 0.0.2 of June 1).

---

<div class="post-metadata">

### Author: ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)
#### Post date: [December 1, 2017, 11:54am UTC](https://discourse.julialang.org/t/trying-pkgbenchmark-jl-again/7429/5 "2017-12-01T11:54:10Z")

</div>

It is master. It needs more testing (by users) before tagging. Or perhaps I should just tag it. It is very breaking though.

---

<div class="post-metadata">

### Author: ![juliohm](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/juliohm/32/215266_2.png) [@juliohm](https://discourse.julialang.org/u/juliohm)
#### Post date: [December 1, 2017, 5:34pm UTC](https://discourse.julialang.org/t/trying-pkgbenchmark-jl-again/7429/6 "2017-12-01T17:34:15Z")

</div>

Nice @kristoffer.carlsson, I was missing the `showall` command at the end to read the results. I will give it a try again on master. I don’t see the progress bar though, I will add more tests and check it.
