mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2025-02-16 17:34:52 -06:00
initial test
This commit is contained in:
parent
f24373d330
commit
fc25a2b4eb
@ -4,6 +4,8 @@ scenarios:
|
|||||||
- run driver=cql tags==phase:schema threads==1
|
- run driver=cql tags==phase:schema threads==1
|
||||||
- run driver=cql tags==phase:rampup cycles===TEMPLATE(rampup-cycles,10000000) threads=auto
|
- run driver=cql tags==phase:rampup cycles===TEMPLATE(rampup-cycles,10000000) threads=auto
|
||||||
- run driver=cql tags==phase:main cycles===TEMPLATE(main-cycles,10000000) threads=auto
|
- run driver=cql tags==phase:main cycles===TEMPLATE(main-cycles,10000000) threads=auto
|
||||||
|
params:
|
||||||
|
instrument: TEMPLATE(instrument,false)
|
||||||
bindings:
|
bindings:
|
||||||
machine_id: Mod(<<sources:10000>>); ToHashedUUID() -> java.util.UUID
|
machine_id: Mod(<<sources:10000>>); ToHashedUUID() -> java.util.UUID
|
||||||
sensor_name: HashedLineToString('data/variable_words.txt')
|
sensor_name: HashedLineToString('data/variable_words.txt')
|
||||||
@ -59,6 +61,8 @@ blocks:
|
|||||||
idempotent: true
|
idempotent: true
|
||||||
tags:
|
tags:
|
||||||
name: insert-rampup
|
name: insert-rampup
|
||||||
|
params:
|
||||||
|
instrument: TEMPLATE(instrument-writes,TEMPLATE(instrument,false))
|
||||||
- tags:
|
- tags:
|
||||||
phase: verify
|
phase: verify
|
||||||
type: read
|
type: read
|
||||||
@ -72,6 +76,8 @@ blocks:
|
|||||||
verify-fields: "*, -cell_timestamp"
|
verify-fields: "*, -cell_timestamp"
|
||||||
tags:
|
tags:
|
||||||
name: select-verify
|
name: select-verify
|
||||||
|
params:
|
||||||
|
instrument: TEMPLATE(instrument-reads,TEMPLATE(instrument,false))
|
||||||
- tags:
|
- tags:
|
||||||
phase: main
|
phase: main
|
||||||
type: read
|
type: read
|
||||||
@ -85,6 +91,8 @@ blocks:
|
|||||||
limit <<limit:10>>
|
limit <<limit:10>>
|
||||||
tags:
|
tags:
|
||||||
name: select-read
|
name: select-read
|
||||||
|
params:
|
||||||
|
instrument: TEMPLATE(instrument-reads,TEMPLATE(instrument,false))
|
||||||
- tags:
|
- tags:
|
||||||
phase: main
|
phase: main
|
||||||
type: write
|
type: write
|
||||||
@ -100,3 +108,6 @@ blocks:
|
|||||||
idempotent: true
|
idempotent: true
|
||||||
tags:
|
tags:
|
||||||
name: insert-main
|
name: insert-main
|
||||||
|
params:
|
||||||
|
instrument: TEMPLATE(instrument-writes,TEMPLATE(instrument,false))
|
||||||
|
|
||||||
|
@ -48,8 +48,13 @@ public class StrInterpolator implements Function<String, String> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String apply(String s) {
|
public String apply(String raw) {
|
||||||
return substitutor.replace(substitutor2.replace(s));
|
String after = substitutor.replace(substitutor2.replace(raw));
|
||||||
|
while (!after.equals(raw)) {
|
||||||
|
raw=after;
|
||||||
|
after = substitutor.replace(substitutor2.replace(raw));
|
||||||
|
}
|
||||||
|
return after;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class MultiMap extends StrLookup<String> {
|
public static class MultiMap extends StrLookup<String> {
|
||||||
|
@ -119,4 +119,12 @@ public class StrInterpolatorTest {
|
|||||||
assertThat(a).isEqualTo("'Key': 'Value'.'Stuff'");
|
assertThat(a).isEqualTo("'Key': 'Value'.'Stuff'");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void shouldExpandNestedTemplates() {
|
||||||
|
String a = interp.apply("-TEMPLATE(akey,TEMPLATE(dkey,whee)-");
|
||||||
|
assertThat(a).isEqualTo("-aval1-");
|
||||||
|
String b = interp.apply("-TEMPLATE(unknown,TEMPLATE(bkey,whee))-");
|
||||||
|
assertThat(b).isEqualTo("-bval1-");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user