|
View:
New views
2 Messages
—
Rating Filter:
Alert me
|
|
|
blind sweep - aggregationI would now like to transform the following output (without changing the experiment):
# test_name|op.cnt_all[] count(n_error,n_error<1 )|op.cnt_pass[] count(n_error)|op.cnt_all[] A 2 3 To this output: name errors count A 0 2 A 1 1 B 0 0 B 1 2 In other words, I want to GROUP BY on all fields. You mentioned a few posts ago that this could be done using a "blind sweep". I looked at test/sweep. Looks like sweep_qry_1.xml does something like the following: foreach item in list of filters { perform query with item output result } (Though I'm having trouble deciphering the verify file for that test. I tried viewing it w/ PostScript, but couldn't. How can I view it?) Do I want to do something similar to the above, but with <combiner>? Here is what I tried: $ cat query_rollup.xml <query id="rollup"> <experiment>rollup</experiment> <description>rollup test</description> <parameter id="p.name" show="all"> <value>test_name</value> <sweep></sweep> </parameter> <source id="src.test_results"> <result>n_error</result> <input>p.name</input> </source> <operator id="op.pass" type="limit" variant="less" value="1"> <input>src.test_results</input> </operator> <operator id="op.cnt_pass" type="count"> <input>op.pass</input> </operator> <operator id="op.cnt_all" type="count"> <input>src.test_results</input> </operator> <combiner id="comb"> <input>op.cnt_pass</input> <input>op.cnt_all</input> </combiner> <output> <input>comb</input> </output> </query> $ cat exp_rollup.xml <experiment> <name>rollup</name> ... <parameter> <name>test_name</name> <datatype>string</datatype> <sweep></sweep> </parameter> <result> <name>n_error</name> <datatype>integer</datatype> </result> </experiment> $ cat inp_rollup.xml <input> <experiment>rollup</experiment> <named_location len="0"> <name>test_name</name> <match>test_name: </match> </named_location> <named_location store_set="yes"> <name>n_error</name> <match>errors:</match> </named_location> </input> $ cat input.dat test_name: A errors: 0 test_name: A errors: 0 test_name: A errors: 1 test_name: B errors: 1 test_name: B errors: 1 $ perfbase query --desc=query_rollup.xml # test_name = 'A' test_name = 'B' test_name = 'A' test_name = 'B' # test_name|op.cnt_all~0[] count(n_error,n_error<1 )|op.cnt_pass~0[] count(n_error,n_error<1 )|op.cnt_pass~1[] count(n_error)|op.cnt_all~0[] count(n_error)|op.cnt_all~1[] A 2 0 3 2 Data files for the experiment: $ cat 1 2 3 4 5 test_name: A errors: 0 test_name: A errors: 0 test_name: A errors: 1 test_name: B errors: 1 test_name: B errors: 1 --- Thank you, Ethan --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
Re: blind sweep - aggregationEthan Mallove wrote:
> I would now like to transform the following output (without changing the experiment): > > # test_name|op.cnt_all[] count(n_error,n_error<1 )|op.cnt_pass[] count(n_error)|op.cnt_all[] > A 2 3 > > To this output: > > name errors count > A 0 2 > A 1 1 > B 0 0 > B 1 2 > Ethan, sorry, but I have no time to look into this right now. For certain tasks, it is advisable to use exertnal scripting to generate multiple queries and to gather the results of those, instead of trying to put everything into a single query. Joachim -- Joachim Worringen, Software Architect, Dolphin Interconnect Solutions phone ++49/(0)228/324 08 17 - http://www.dolphinics.com --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
| Free embeddable forum powered by Nabble | Forum Help |