hobbit-project / platform

HOBBIT benchmarking platform
GNU General Public License v2.0
23 stars 9 forks source link

Boolean as a benchmark parameter #232

Closed mirkospasic closed 4 years ago

mirkospasic commented 6 years ago

I try to use a boolean as a benchmark parameter in my DataStorageBenchmark v2.0: https://git.project-hobbit.eu/mspasic/dsb-benchmarkcontroller/blob/master/benchmark.ttl#L131

But, in the Benchmark Controller component, I will always get false, whether the checkbox is checked or not: https://log.project-hobbit.eu/app/kibana#/discover?_g=(refreshInterval:('$$hashKey':'object:692',display:'5%20seconds',pause:!t,section:1,value:5000),time:(from:'2018-03-08T08:14:13.064Z',mode:absolute,to:'2018-03-08T08:18:36.510Z'))&_a=(columns:!(image_name,message),index:'logstash-*',interval:auto,query:(query_string:(analyze_wildcard:!t,query:boolean)),sort:!('@timestamp',desc))

MichaelRoeder commented 6 years ago

We experienced a similar problem for challenges (#34). Since we coulnd't identify the problem until now, we are using a workaround that might be helpful for you as well (see the method at https://github.com/hobbit-project/platform/blob/master/hobbit-gui/gui-serverbackend/src/main/java/de/usu/research/hobbit/gui/rabbitmq/RdfModelHelper.java#L375-L393)

mirkospasic commented 6 years ago

It seems that these issues are not the similar ones. I have tried to use the proposed workaround, but it didn't helped me. Actually, the following line doesn't throw an exception for me: https://github.com/hobbit-project/platform/blob/master/hobbit-gui/gui-serverbackend/src/main/java/de/usu/research/hobbit/gui/rabbitmq/RdfModelHelper.java#L377 It will return true or false. I notice also that it will return the value that is specified as the default value for the parameter: https://git.project-hobbit.eu/mspasic/dsb-benchmarkcontroller/blob/master/benchmark.ttl#L132 So, if I specify false/true as the default value, it will be false/true (respectively), no matter if I enable or disable it from the GUI check box. Also, the check box will be disabled at the beginning no matter what I specify as the default parameter value...

extra3 commented 6 years ago

The HOBBIT GUI seems to post the wrong value (always default) for booleans to the server:

When you open the Network Monitor in Firefox (Ctrl+Shift+Q, alternative F12) you can inspect the request while starting a benchmark.

There will be a POST request called "benchmarks" with the array "configurationParams". Regardless of the checkbox status, the corresponding xsd:boolean has always the default value.

Maybe there is no javascript event listener connected to those checkboxes?

Currently there are two benchmarks using checkboxes and having this problem:

Berlin SPARQL Benchmark (default: false, checkbox initially not set, POST value: false) Data Storage Benchmark v2.0 (default: true, checkbox initially not set, POST value: true)

mirkospasic commented 6 years ago

For Data Storage Benchmark v2.0, the default should be false, as well. I have changed temporarily the default value because there is no other way to try the benchmark with the parameter set to true.

mirkospasic commented 6 years ago

Any news here?

MichaelRoeder commented 6 years ago

@Ennosigaeon ?

mirkospasic commented 6 years ago

What I have to do in order to verify this fix?

Ennosigaeon commented 6 years ago

Depends on what you want to do. If you want to use this fix on the HOBBIT website you will have to wait until I have created a pull request (should happen today or tomorrow) and the pull request is merged.

If you want to use this fix locally, simply checkout the branch

MichaelRoeder commented 6 years ago

The fix worked in my local test. Will create a PR for it.

mirkospasic commented 5 years ago

Right now, everything works correctly, except the initial state of check-box. The default value of parameter is set to true (https://git.project-hobbit.eu/mspasic/dsb-benchmarkcontroller/blob/master/benchmark.ttl#L141), but still the checkbox on GUI at the very beginning isn't checked. If I click at least one time on the checkbox, everything works as expected, so the problem is only in the initial state of the checkbox.