This repository has been archived by the owner on Mar 15, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema.sql
43 lines (41 loc) · 1.52 KB
/
schema.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
create table if not exists retrieval_events(
retrieval_id uuid not null,
instance_id character varying(64) not null,
cid character varying(256) not null,
storage_provider_id character varying(256),
phase character varying(15) not null,
phase_start_time timestamp with time zone not null,
event_name character varying(32) not null,
event_time timestamp with time zone not null,
event_details jsonb
);
create table if not exists aggregate_retrieval_events(
retrieval_id uuid not null UNIQUE,
root_cid character varying(256),
url_path text,
instance_id character varying(64) not null,
storage_provider_id character varying(256),
filecoin_storage_provider_id character varying(16),
time_to_first_byte bigint,
bandwidth_bytes_sec bigint,
bytes_transferred bigint,
success boolean not null,
start_time timestamp with time zone not null,
end_time timestamp with time zone not null,
time_to_first_indexer_result bigint,
indexer_candidates_received integer,
indexer_candidates_filtered integer,
protocols_allowed character varying[],
protocols_attempted character varying[],
protocol_succeeded character varying(256)
);
create table if not exists retrieval_attempts(
retrieval_id uuid not null,
storage_provider_id character varying(256),
filecoin_storage_provider_id character varying(16),
time_to_first_byte bigint,
error text,
protocol character varying(256),
bytes_transferred bigint,
FOREIGN KEY (retrieval_id) REFERENCES aggregate_retrieval_events (retrieval_id)
);