Julian>I'm struggling to find an end-to-end case
I mean metadataQuery-specific tests here, not end-to-end ones.
In other words, I want something like
@Setup
public void ...
@Benchmark
public Object columnUniqueness() {
return metadataProvider.getColumnUniqueness(whateverArgs);
}
As far as I understand, we can have that kind of benchmark to evaluate
the performance of metadata query, we can know how much memory a call
allocates, etc, etc.
As soon as we have a benchmark, we can actually measure different
implementations (indexOf vs Map vs switch).
I assume we can somehow setup the whole thing, so metadata query is a
finite number of calls. Can we?
Julian> it sounds like you're
Julian>talking about perfect hashing
I am.
FIY: switch(String) is compiled to switch(s.hashCode()) kind of thing.
Well, the requirements are slightly different, thus map might work
better for us.
Vladimir