Skip to content
This repository has been archived by the owner on Aug 6, 2022. It is now read-only.

InsertBatch seems unnecessarily fussy about parameters #1

Open
ringerc opened this issue Jul 30, 2018 · 6 comments
Open

InsertBatch seems unnecessarily fussy about parameters #1

ringerc opened this issue Jul 30, 2018 · 6 comments

Comments

@ringerc
Copy link
Member

ringerc commented Jul 30, 2018

} else if (!(p2multi == 128 || p1nrows == 1024)) {

It seems to only run if multiinsert is 128 or nrows is 1024.

Perhaps something closer to

    } else if ((p1nrows % p2multi) != 0) {
      System.err.println("p1nrows must be evenly divisible by p2multi");
      System.exit(-1);
    }

was intended?

@vlsi
Copy link
Member

vlsi commented Jul 30, 2018

That is there to save time on measurements.

Otherwise there are too many permutations of the arguments with little additional value.

@ringerc
Copy link
Member Author

ringerc commented Jul 30, 2018

That makes sense. I wonder if there's a better way to do that, perhaps at the jmh level? Right now, if you want a run like

java -jar target/benchmarks.jar \
    '^org.postgresql.benchmark.statement.InsertBatch.insertBatch$' \
    -bm Throughput \
    -p p1nrows=100,1000,10000,100000 -p p2multi=1

you can't presently do it.

For now I've patched it in my copy.

I definitely suggest an informative error like "permutation skipped" or "invalid parameter combination"

@vlsi
Copy link
Member

vlsi commented Jul 30, 2018

@vlsi
Copy link
Member

vlsi commented Jul 30, 2018

I think system property can be added to "run all the permutations".

@ringerc
Copy link
Member Author

ringerc commented Jul 30, 2018

Makes sense. I think the main thing is to give it a meaningful message and useful comment (issue link, explanation)

@ringerc
Copy link
Member Author

ringerc commented Jul 30, 2018

It's easy enough to patch if you know what and why

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants