Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion asap-tools/experiments/experiment_utils/services/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
DumbKafkaConsumerService,
)
from .grafana import GrafanaService
from .clickhouse_service import ClickHouseService
from .clickhouse_service import ClickHouseService, ClickHouseDataLoaderService


def create_prometheus_service(cfg, provider, num_nodes: int, node_offset: int):
Expand Down Expand Up @@ -155,4 +155,5 @@ def create_prometheus_service(cfg, provider, num_nodes: int, node_offset: int):
"GrafanaService",
"create_prometheus_service",
"ClickHouseService",
"ClickHouseDataLoaderService",
]
115 changes: 115 additions & 0 deletions asap-tools/experiments/experiment_utils/services/clickbench/init.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
-- ClickHouse schema for ClickBench (hits table, MergeTree only, no Kafka engine).
-- Matches benchmark/configs/clickbench_hits_init.sql.

CREATE TABLE IF NOT EXISTS hits
(
WatchID Int64,
JavaEnable UInt8,
Title String,
GoodEvent Int16,
EventTime DateTime,
EventDate Date,
CounterID UInt32,
ClientIP Int32,
RegionID UInt32,
UserID Int64,
CounterClass Int8,
OS UInt8,
UserAgent UInt8,
URL String,
Referer String,
IsRefresh UInt8,
RefererCategoryID UInt16,
RefererRegionID UInt32,
URLCategoryID UInt16,
URLRegionID UInt32,
ResolutionWidth UInt16,
ResolutionHeight UInt16,
ResolutionDepth UInt8,
FlashMajor UInt8,
FlashMinor UInt8,
FlashMinor2 String,
NetMajor UInt8,
NetMinor UInt8,
UserAgentMajor UInt16,
UserAgentMinor String,
CookieEnable UInt8,
JavascriptEnable UInt8,
IsMobile UInt8,
MobilePhone UInt8,
MobilePhoneModel String,
Params String,
IPNetworkID UInt32,
TraficSourceID Int8,
SearchEngineID UInt16,
SearchPhrase String,
AdvEngineID UInt8,
IsArtifical UInt8,
WindowClientWidth UInt16,
WindowClientHeight UInt16,
ClientTimeZone Int16,
ClientEventTime DateTime,
SilverlightVersion1 UInt8,
SilverlightVersion2 UInt8,
SilverlightVersion3 UInt32,
SilverlightVersion4 UInt16,
PageCharset String,
CodeVersion UInt32,
IsLink UInt8,
IsDownload UInt8,
IsNotBounce UInt8,
FUniqID Int64,
OriginalURL String,
HID UInt32,
IsOldCounter UInt8,
IsEvent UInt8,
IsParameter UInt8,
DontCountHits UInt8,
WithHash UInt8,
HitColor String,
LocalEventTime DateTime,
Age UInt8,
Sex UInt8,
Income UInt8,
Interests UInt16,
Robotness UInt8,
RemoteIP Int32,
WindowName Int32,
OpenerName Int32,
HistoryLength Int16,
BrowserLanguage String,
BrowserCountry String,
SocialNetwork String,
SocialAction String,
HTTPError UInt16,
SendTiming UInt32,
DNSTiming UInt32,
ConnectTiming UInt32,
ResponseStartTiming UInt32,
ResponseEndTiming UInt32,
FetchTiming UInt32,
SocialSourceNetworkID UInt8,
SocialSourcePage String,
ParamPrice Int64,
ParamOrderID String,
ParamCurrency String,
ParamCurrencyID UInt16,
OpenstatServiceName String,
OpenstatCampaignID String,
OpenstatAdID String,
OpenstatSourceID String,
UTMSource String,
UTMMedium String,
UTMCampaign String,
UTMContent String,
UTMTerm String,
FromTag String,
HasGCLID UInt8,
RefererHash Int64,
URLHash Int64,
CLID UInt32
)
ENGINE = MergeTree
PARTITION BY toYYYYMM(EventDate)
ORDER BY (CounterID, EventDate, intHash32(UserID), EventTime, WatchID)
SETTINGS index_granularity = 8192;
Loading
Loading