All Downloads are FREE. Search and download functionalities are using the official Maven repository.

activities.baselines.cql-tabular.yaml Maven / Gradle / Ivy

There is a newer version: 3.12.99
Show newest version
# nb -v cql-tabular rampup-cycles=1E6 main-cycles=1E9
scenarios:
  default:
    - run driver=cql tags==phase:schema threads==1 cycles==UNDEF
    - 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
bindings:
  # for ramp-up and verify
  part_layout: Div(<>); ToString() -> String
  clust_layout: Mod(<>); ToString() -> String
  data: HashedFileExtractToString('data/lorem_ipsum_full.txt',50,150)
  # for read
  limit: Uniform(1,10) -> int
  part_read: Uniform(0,<>)->int; ToString() -> String
  clust_read: Add(1); Uniform(0,<>)->int; ToString() -> String
  # for write
  part_write: Hash(); Uniform(0,<>)->int; ToString() -> String
  clust_write: Hash(); Add(1); Uniform(0,<>)->int; ToString() -> String
  data_write: Hash(); HashedFileExtractToString('data/lorem_ipsum_full.txt',50,150) -> String

blocks:
  - name: schema
    tags:
      phase: schema
    params:
      prepared: false
    statements:
    - create-keyspace: |
        create keyspace if not exists <>
        WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '<>'}
        AND durable_writes = true;
      tags:
        name: create-keyspace
    - create-table: |
        create table if not exists <>.<> (
         part text,
         clust text,
         data text,
         PRIMARY KEY (part,clust)
        );
      tags:
        name: create-table
  - name: rampup
    tags:
      phase: rampup
    params:
      cl: <>
    statements:
      - rampup-insert: |
         insert into <>.<>
         (part,clust,data)
         values ({part_layout},{clust_layout},{data})
        tags:
          name: rampup-insert
  - name: verify
    tags:
      phase: verify
      type: read
    params:
      cl: <>
    statements:
      - verify-select: |
          select * from <>.<> where part={part_layout} and clust={clust_layout}
        tags:
          name: verify-select
  - name: main-read
    tags:
      phase: main
      type: read
    params:
      ratio: 5
      cl: <>
    statements:
    - main-select: |
        select * from <>.<> where part={part_read} limit {limit};
      tags:
        name: main-select
  - name: main-write
    tags:
      phase: main
      type: write
    params:
      ratio: 5
      cl: <>
    statements:
    - main-write: |
        insert into <>.<>
        (part, clust, data)
        values ({part_write},{clust_write},{data_write})
      tags:
        name: main-write




© 2015 - 2025 Weber Informatics LLC | Privacy Policy