SHARE
TWEET

Untitled

a guest Jun 15th, 2019 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- Invariants:
  2. -- * Each run is only ever used on one cloud
  3. -- * Each run only ever uses one version of Cockroach
  4. CREATE TABLE runs (
  5.     id INT8 PRIMARY KEY,
  6.     crdb_version STRING DEFAULT 'master',
  7.     INDEX (cloud) COVERING id, -- Get all runs by cloud
  8.     INDEX (crdb_version) COVERING id -- Get all runs by version; e.g. roachperf wants master but SE tools want specific version
  9. );
  10.  
  11. -- Metadata about each instance of the workload being run
  12. CREATE TABLE test_details (
  13.     runs_id INT8 REFERENCES runs (id),
  14.         id SERIAL UNIQUE, -- simplify data_details lookups; UNIQUE optimizes all FK lookups
  15.     test_name STRING,
  16.     PRIMARY KEY(runs_id, id),
  17.     INDEX(test_name) COVERING id -- Get all IDs by test name
  18. );
  19.  
  20. -- Track the hardware used for the test, which we'll ultimately want for cluster sizing/SE work
  21. CREATE TABLE infrastructure (
  22.     test_detail_id INT8 REFERENCES test_details (id),
  23.     instance_class STRING,
  24.         disk_type STRING,
  25.         zone STRING,
  26.     quantity INT,
  27.         PRIMARY KEY (test_detail_id, instance_class, disk_type, zone)
  28. );
  29.  
  30. -- Overview of all benchmarks of a given name on a given platform
  31. CREATE TABLE data_overview (
  32.     test_detail_id INT8 REFERENCES test_details (id),
  33.     date TIMESTAMP,
  34.     data JSONB, -- possible to track CPU percentage here; the SE work will want to filter this on things under 50% average utilization
  35.     PRIMARY KEY(test_detail_id, date)
  36. );
  37.  
  38. -- Details of specific instance of benchmark/workload being run
  39. CREATE TABLE data_details (
  40.     test_detail_id INT8 REFERENCES test_details (id),
  41.     ts TIMESTAMP,
  42.     operation STRING,
  43.     count INT8, -- This could be JSONB for the sake of consistency?
  44.     p95 INT8, -- This could be JSONB for the sake of consistency?
  45.     PRIMARY KEY(test, cloud, runid, ts, operation)
  46. );
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top