Commit 3f43437d authored by Heinz N. Gies's avatar Heinz N. Gies

HPTS support

parent 8bff6ec7
Pipeline #18459145 passed with stage
in 1 minute and 16 seconds
<!doctype html>
<html class="no-js" lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>DalmatinerDB | Buckets</title>
<link rel="stylesheet" href="/css/foundation.css" />
<script src="/js/vendor/modernizr.js"></script>
<script src="/js/vendor/jquery.js"></script>
<script src="/js/vendor/jquery.cookie.js"></script>
<script src="/js/vendor/fastclick.js"></script>
<script src="/js/foundation.min.js"></script>
<script src="/js/msgpack.base.js"></script>
<script src="/js/msgpack.codec.js"></script>
<script src="/js/msgpack.js"></script>
<script src="/js/bucket.js"></script>
</head>
<body>
<nav class="top-bar" data-topbar>
<ul class="title-area">
<li class="name">
<h1><a href="#">Dalmatiner DB</a></h1>
</li>
<!-- Remove the class "menu-icon" to get rid of menu icon. Take out "Menu" to just have icon alone -->
<li class="toggle-topbar menu-icon"><a href="#"><span>Menu</span></a></li>
</ul>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>DalmatinerDB | Buckets</title>
<link rel="stylesheet" href="/css/foundation.css" />
<script src="/js/vendor/modernizr.js"></script>
<script src="/js/vendor/jquery.js"></script>
<script src="/js/vendor/jquery.cookie.js"></script>
<script src="/js/vendor/fastclick.js"></script>
<script src="/js/foundation.min.js"></script>
<script src="/js/msgpack.base.js"></script>
<script src="/js/msgpack.codec.js"></script>
<script src="/js/msgpack.js"></script>
<script src="/js/bucket.js"></script>
</head>
<body>
<nav class="top-bar" data-topbar>
<ul class="title-area">
<li class="name">
<h1><a href="#">Dalmatiner DB</a></h1>
</li>
<!-- Remove the class "menu-icon" to get rid of menu icon. Take out "Menu" to just have icon alone -->
<li class="toggle-topbar menu-icon"><a href="#"><span>Menu</span></a></li>
</ul>
<section class="top-bar-section">
<!-- Left Nav Section -->
<ul class="left tabs" data-options="deep_linking:true" data-tab>
<li><a href="/">Query</a></li>
<li><a href="/events">Events</a></li>
<li><a href="/buckets">Buckets</a></li>
<li><a href="/functions">Functions</a></li>
</ul>
</section>
</nav>
<div class="row">
<div class="large-12 columns">
<table>
<thead>
<tr>
<th>Bucket</th>
<th>Resolution</th>
<th>PPF</th>
<th>Grace</th>
<th>TTL</th>
</tr>
</thead>
<tbody id="buckets">
</tbody>
</table>
</div>
</div>
<section class="top-bar-section">
<!-- Left Nav Section -->
<ul class="left tabs" data-options="deep_linking:true" data-tab>
<li><a href="/">Query</a></li>
<li><a href="/events">Events</a></li>
<li><a href="/buckets">Buckets</a></li>
<li><a href="/functions">Functions</a></li>
</ul>
</section>
</nav>
<div class="row">
<div class="large-12 columns">
<table>
<thead>
<tr>
<th>Bucket</th>
<th>Resolution</th>
<th>PPF</th>
<th>Grace</th>
<th>TTL</th>
<th>HPTS</th>
</tr>
</thead>
<tbody id="buckets">
</tbody>
</table>
</div>
</div>
</body>
</html>
$(function() {
msgpack.download("", {header: {accept:"application/x-msgpack"}}, function(d) {
console.log(d)
console.log("buckets:", d)
d.forEach(function(e) {
$("#buckets").append("<tr>"+
"<td><a href='/buckets/"+ e.name + "'>" + e.name +"</a></td>"+
"<td>" + e.resolution + "ms</td>"+
"<td>" + e.ppf + "</td>"+
"<td>" + e.grace + "ns</td>"+
"<td>" + e.ttl + "</td>"+
"<td>" + e.resolution + "ms</td>" +
"<td>" + e.ppf + "</td>" +
"<td>" + e.grace + "ns</td>" +
"<td>" + e.ttl + "</td>" +
"<td>" + e.hpts + "</td>" +
"</tr>")
})
})
......
......@@ -53,17 +53,34 @@ handle(Req, State) ->
end.
encode_reply(Start, T, R2) ->
R3 = [#{name => Name,
resolution => Resolution,
values => mmath_bin:to_list(Data),
metadata => maps:map(fun to_null/2, Mdata),
type => <<"metrics">>}
R3 = [#{
name => Name,
resolution => Resolution,
values => mmath_bin:to_list(Data),
metadata => maps:map(fun to_null/2, Mdata),
type => <<"metrics">>,
hpts => false
}
|| #{name := Name,
data := Data,
type := metrics,
metadata := Mdata,
resolution := Resolution} <- R2],
R4 = [#{name => Name,
R4 = [#{
name => Name,
resolution => Resolution,
values => [#{date => D, value => V}
|| {D, V} <- mmath_hpts:to_list(Data)],
metadata => maps:map(fun to_null/2, Mdata),
type => <<"metrics">>,
hpts => true
}
|| #{name := Name,
data := Data,
type := hpts,
metadata := Mdata,
resolution := Resolution} <- R2],
R5 = [#{name => Name,
metadata => maps:map(fun to_null/2, Mdata),
values => [#{timestamp => Ts, event => E}
|| {Ts, E} <- Data],
......@@ -74,7 +91,7 @@ encode_reply(Start, T, R2) ->
type := events} <- R2],
D = #{start => Start,
query_time => T,
results => R3 ++ R4},
results => R3 ++ R4 ++ R5},
case R2 of
[#{type := graph,
value := Graph} | _] ->
......
......@@ -16,7 +16,7 @@
{jsone, "~>1.2.3"},
fifo_utils,
{msgpack, "0.3.5"},
{dqe, ".*", {git, "https://gitlab.com/Project-FiFo/DalmatinerDB/dqe.git", {branch, "master"}}},
{dqe, ".*", {git, "https://gitlab.com/Project-FiFo/DalmatinerDB/dqe.git", {branch, "hpts"}}},
{otters, "~>0.2.0"},
eper,
recon
......
......@@ -2,36 +2,48 @@
[{<<"cf">>,{pkg,<<"cf">>,<<"0.2.2">>},1},
{<<"cowboy">>,{pkg,<<"cowboy">>,<<"1.0.4">>},0},
{<<"cowlib">>,{pkg,<<"cowlib">>,<<"1.0.2">>},1},
{<<"ddb_client">>,{pkg,<<"ddb_client">>,<<"0.5.7">>},2},
{<<"ddb_connection">>,{pkg,<<"ddb_connection">>,<<"0.4.3">>},1},
{<<"ddb_client">>,
{git,"https://gitlab.com/Project-FiFo/DalmatinerDB/ddb_client.git",
{ref,"ee1f4131767ed3cbf93e47f50200667369cf7c3d"}},
2},
{<<"ddb_connection">>,
{git,"https://gitlab.com/Project-FiFo/DalmatinerDB/ddb_connection.git",
{ref,"d296650d4f527c7c1d59543d932be169072d8f4e"}},
1},
{<<"dflow">>,{pkg,<<"dflow">>,<<"0.3.0">>},1},
{<<"dproto">>,{pkg,<<"dproto">>,<<"0.5.2">>},1},
{<<"dproto">>,
{git,"https://gitlab.com/Project-FiFo/DalmatinerDB/dproto.git",
{ref,"83996cf9a1173acc6e67e738f5e1357af5cbdb60"}},
2},
{<<"dqe">>,
{git,"https://gitlab.com/Project-FiFo/DalmatinerDB/dqe.git",
{ref,"6d8f70fa79c6ef438cfa73fc630b86281f612053"}},
{ref,"d07f74322c065edbc13b937eada2f8ea469abc65"}},
0},
{<<"dqe_fun">>,{pkg,<<"dqe_fun">>,<<"0.2.1">>},1},
{<<"dqe_idx">>,{pkg,<<"dqe_idx">>,<<"0.4.3">>},1},
{<<"dqe_idx_ddb">>,{pkg,<<"dqe_idx_ddb">>,<<"0.5.1">>},1},
{<<"dqe_idx_ddb">>,
{git,"https://gitlab.com/Project-FiFo/DalmatinerDB/dqe_idx_ddb.git",
{ref,"6b3f931ec073ee2d95af6560f94777f775407d91"}},
1},
{<<"dqe_idx_pg">>,{pkg,<<"dqe_idx_pg">>,<<"0.5.7">>},1},
{<<"dynamic_compile">>,{pkg,<<"dynamic_compile">>,<<"1.0.0">>},1},
{<<"eper">>,{pkg,<<"eper">>,<<"0.94.0">>},0},
{<<"epgsql">>,{pkg,<<"epgsql">>,<<"3.3.0">>},3},
{<<"erlware_commons">>,{pkg,<<"erlware_commons">>,<<"1.0.0">>},0},
{<<"erlware_commons">>,{pkg,<<"erlware_commons">>,<<"1.0.5">>},0},
{<<"fifo_lager">>,{pkg,<<"fifo_lager">>,<<"0.1.8">>},0},
{<<"fifo_utils">>,{pkg,<<"fifo_utils">>,<<"0.1.51">>},0},
{<<"fifo_utils">>,{pkg,<<"fifo_utils">>,<<"0.1.52">>},0},
{<<"goldrush">>,{pkg,<<"goldrush">>,<<"0.1.9">>},1},
{<<"hdr_histogram">>,{pkg,<<"hdr_histogram">>,<<"0.3.2">>},1},
{<<"ibrowse">>,{pkg,<<"ibrowse">>,<<"4.4.0">>},1},
{<<"jsone">>,{pkg,<<"jsone">>,<<"1.2.6">>},0},
{<<"jsx">>,{pkg,<<"jsx">>,<<"2.8.2">>},2},
{<<"jsxd">>,{pkg,<<"jsxd">>,<<"0.2.4">>},2},
{<<"lager">>,{pkg,<<"lager">>,<<"3.5.1">>},0},
{<<"jsx">>,{pkg,<<"jsx">>,<<"2.8.3">>},2},
{<<"jsxd">>,{pkg,<<"jsxd">>,<<"0.2.4">>},3},
{<<"lager">>,{pkg,<<"lager">>,<<"3.5.2">>},0},
{<<"lager_graylog">>,{pkg,<<"lager_graylog">>,<<"0.1.3">>},1},
{<<"lager_logstash_backend">>,
{pkg,<<"lager_logstash_backend">>,<<"0.1.3">>},
1},
{<<"mmath">>,{pkg,<<"mmath">>,<<"0.2.19">>},1},
{<<"mmath">>,{pkg,<<"mmath">>,<<"0.2.24">>},1},
{<<"msgpack">>,{pkg,<<"msgpack">>,<<"0.3.5">>},0},
{<<"otters">>,{pkg,<<"otters">>,<<"0.2.10">>},0},
{<<"pgapp">>,{pkg,<<"pgapp">>,<<"0.0.2">>},2},
......@@ -41,50 +53,46 @@
{ref,"fcfb8105014b8bef19f50dd89647c0e58dae0903"}},
1},
{<<"qdate_localtime">>,{pkg,<<"qdate_localtime">>,<<"1.1.0">>},2},
{<<"quickrand">>,{pkg,<<"quickrand">>,<<"1.7.2">>},1},
{<<"quickrand">>,{pkg,<<"quickrand">>,<<"1.7.3">>},1},
{<<"ranch">>,{pkg,<<"ranch">>,<<"1.2.1">>},0},
{<<"recon">>,{pkg,<<"recon">>,<<"2.3.2">>},0},
{<<"snappiest">>,{pkg,<<"snappiest">>,<<"1.2.0">>},2},
{<<"recon">>,{pkg,<<"recon">>,<<"2.3.4">>},0},
{<<"snappiest">>,{pkg,<<"snappiest">>,<<"1.2.0">>},3},
{<<"sqlmig">>,{pkg,<<"sqlmig">>,<<"0.1.5">>},2},
{<<"uuid">>,{pkg,<<"uuid_erl">>,<<"1.7.2">>},1}]}.
{<<"uuid">>,{pkg,<<"uuid_erl">>,<<"1.7.3">>},1}]}.
[
{pkg_hash,[
{<<"cf">>, <<"7F2913FFF90ABCABD0F489896CFEB0B0674F6C8DF6C10B17A83175448029896C">>},
{<<"cowboy">>, <<"A324A8DF9F2316C833A470D918AAF73AE894278B8AA6226CE7A9BF699388F878">>},
{<<"cowlib">>, <<"9D769A1D062C9C3AC753096F868CA121E2730B9A377DE23DEC0F7E08B1DF84EE">>},
{<<"ddb_client">>, <<"1BC5836D3EB6786778F6DD202B64D4649DAA44C8882FA2001BB22C1CA17C72E1">>},
{<<"ddb_connection">>, <<"B74F010840917CFAF6088391DCC9B91A1036213E4DDF2B58B4F7FBC00AEA01C2">>},
{<<"dflow">>, <<"DA0EB8F14B01ED894BD32F1CEE3B13646DFC30FA60D59B408BFCD0653E0984D7">>},
{<<"dproto">>, <<"D1C9929353589BD395CAB3E5C6E1CFC4DC8B0660527145E2DD221771D4467ABD">>},
{<<"dqe_fun">>, <<"6A634A0DC40D82365C7DE8BFEE6485E1A64770E6568497DEA70926DF46CE9B7C">>},
{<<"dqe_idx">>, <<"275F45869B1791BE6679D6B4A250C72CF43636CB4B3F2213E5D4AA6F8E0F1CF2">>},
{<<"dqe_idx_ddb">>, <<"8E0F6034A3890293A620293BC384BF1DDC8D9124985F56B304D6996603483EF2">>},
{<<"dqe_idx_pg">>, <<"E6B24FEF5DD8F323FA14F67DB76DE15C0636B579E0CE6C5A3968CAD5EC3C0712">>},
{<<"dynamic_compile">>, <<"8171B2CB4953EA3ED2EF63F5B26ABF677ACD0CA32210C2A08A7A8406A743F76B">>},
{<<"eper">>, <<"F5FB2DAA0DF8878748E1C598428EDA942A173E5121FF35C1D632129B84593A3A">>},
{<<"epgsql">>, <<"974A578340E52012CBAB820CE756E7ED1DF1BAF0110C59A6753D8337A2CF9454">>},
{<<"erlware_commons">>, <<"087467DE5833C0BB5B3CCDD387F9E9C1FB816A75B7A709629BF24B5ED3246C51">>},
{<<"erlware_commons">>, <<"FC23D8E304140B65A811F653A76B2FB10B0CE744608CAF86E9125CEB349C9442">>},
{<<"fifo_lager">>, <<"037C26D77A5E27ECC158889A73CE745111B9291A0DE32CCD0A69E8C1514586A9">>},
{<<"fifo_utils">>, <<"2E1DA92C4C63CB36CF1325FBCF16F20B9781FCBA362CD86CAD300F35628D5E00">>},
{<<"fifo_utils">>, <<"0B65F989E134293AF3E4D874FC4D5F740AE5160DE5C7D26451F40F518A3D564A">>},
{<<"goldrush">>, <<"F06E5D5F1277DA5C413E84D5A2924174182FB108DABB39D5EC548B27424CD106">>},
{<<"hdr_histogram">>, <<"11F4DB284E254614A2164EEF0BFCAB70F9F053481DB428D65E0ACB4B71DB2E4F">>},
{<<"ibrowse">>, <<"2D923325EFE0D2CB09B9C6A047B2835A5EDA69D8A47ED6FF8BC03628B764E991">>},
{<<"jsone">>, <<"3EED1BC3F34D5727A011AB84A20230F4BDD8BB2B9C07C3AD0DCF412410231A74">>},
{<<"jsx">>, <<"7ACC7D785B5ABE8A6E9ADBDE926A24E481F29956DD8B4DF49E3E4E7BCC92A018">>},
{<<"jsx">>, <<"A05252D381885240744D955FBE3CF810504EB2567164824E19303EA59EEF62CF">>},
{<<"jsxd">>, <<"C14114AFCA463F2D03D3FB6CC81FD51CDA8CA86A47E5AC3ABDF0CA572A73A413">>},
{<<"lager">>, <<"63897A61AF646C59BB928FEE9756CE8BDD02D5A1A2F3551D4A5E38386C2CC071">>},
{<<"lager">>, <<"614A8C8F67BF99B69EB264EA22121AD25511C055AAEC09B086773D5108C6767F">>},
{<<"lager_graylog">>, <<"B81F6CC71198F0CF113E74395A12F9C87E22F7B57F5E484A4802413E2A5B8F2C">>},
{<<"lager_logstash_backend">>, <<"86E7FBE08B34DAF9341E9FC397EADFCD7C1ABA0A0EA901FA7A4C454A3C4C335C">>},
{<<"mmath">>, <<"8549F4A2A9C5239323A252974DAE8B40B61BE88826A0EF7E8077900DE943F9E6">>},
{<<"mmath">>, <<"1949802F7731ED06DFFB61EC8882EDABC2B3EB0A0EB6D93E5087DEEAA750CE25">>},
{<<"msgpack">>, <<"1C46114241011452DEEC8145851745A0BB5B637CEE028D4D4ADB9DC3527AF06A">>},
{<<"otters">>, <<"31A7B47D50E14B15CAE380D060F666A54A2D79688BCC29D4CCB70E2FE05B0EA8">>},
{<<"pgapp">>, <<"3E104BB777C8455D8B26D1538B67ABE0188EE97B1DF973FD936C2204CB316196">>},
{<<"poolboy">>, <<"6B46163901CFD0A1B43D692657ED9D7E599853B3B21B95AE5AE0A777CF9B6CA8">>},
{<<"qdate_localtime">>, <<"5F6C3ACF10ECC5A7E2EFA3DCD2C863102B962188DBD9E086EC01D29FE029DA29">>},
{<<"quickrand">>, <<"E856F3C69FEC00D1ACCA8E56CB452B650E838D3A9720811410F439121EFAFE59">>},
{<<"quickrand">>, <<"0E4FB48FAC904FE0C6E21D7E8C31A288A0700E1E81A35B38B649FC119079755D">>},
{<<"ranch">>, <<"A6FB992C10F2187B46FFD17CE398DDF8A54F691B81768F9EF5F461EA7E28C762">>},
{<<"recon">>, <<"4444C879BE323B1B133EEC5241CB84BD3821EA194C740D75617E106BE4744318">>},
{<<"recon">>, <<"B406C2FCCDEAA0D94E23B5E30AE3D635A2D461E363A5C9C6316897037CF050D2">>},
{<<"snappiest">>, <<"25706FEBB5ECAEA900D879A89C6D967C8D1BF700F8546BEBD0DEA514A8CCBFB7">>},
{<<"sqlmig">>, <<"8208D222A9335C1B1171F4FD1CE4150CF28B1FDF37CA9A66715AC434ED9B9AF4">>},
{<<"uuid">>, <<"D596C8DD01A4AE48B9D8D51832CCC8F8302BF67ACD01336AEC3FCFAE6B9D2BC2">>}]}
{<<"uuid">>, <<"C5DF97D1A3D626235C2415E74053C47B2138BB863C5CD802AB5CAECB8ECC019F">>}]}
].
├─ cowboy─1.0.4
│ └─ cowlib─1.0.2
├─ dalmatiner_frontend─0.3.3
├─ dqe─0.7.13
│ ├─ ddb_connection─0.4.3
├─ dqe─v0.7.13+build.326.refd07f743
│ ├─ ddb_connection─0.4.3+build.59.refd296650
│ │ ├─ ddb_client─0.5.7
│ │ └─ poolboy─1.5.1
│ ├─ dflow─0.3.0
│ ├─ dproto─0.5.2
│ │ ├─ jsxd─0.2.4
│ │ └─ snappiest─1.2.0
│ ├─ dqe_fun─0.2.1
│ ├─ dqe_idx─0.4.3
│ ├─ dqe_idx_ddb─0.5.1
│ ├─ dqe_idx_ddb─0.5.1+build.55.ref6b3f931
│ │ └─ dproto─0.5.4+build.148.ref83996cf
│ │ ├─ jsxd─0.2.4
│ │ └─ snappiest─1.2.0
│ ├─ dqe_idx_pg─0.5.7
│ │ ├─ pgapp─0.0.2
│ │ │ └─ epgsql─3.3.0
│ │ └─ sqlmig─0.1.5
│ ├─ hdr_histogram─0.3.2
│ ├─ mmath─0.2.19
│ ├─ mmath─0.2.24
│ └─ qdate─0.4.4
│ └─ qdate_localtime─1.1.0
├─ eper─0.94.0
├─ erlware_commons─1.0.0
├─ erlware_commons─1.0.5
│ └─ cf─0.2.2
├─ fifo_lager─0.1.8
│ ├─ lager_graylog─0.1.3
│ └─ lager_logstash_backend─0.1.3
│ └─ jsx─2.8.2
├─ fifo_utils─0.1.51
│ ├─ quickrand─1.7.2
│ └─ uuid─1.7.2
│ └─ jsx─2.8.3
├─ fifo_utils─0.1.52
│ ├─ quickrand─1.7.3
│ └─ uuid─1.7.3
├─ jsone─1.2.6
├─ lager─3.5.1
├─ lager─3.5.2
│ └─ goldrush─0.1.9
├─ msgpack─0.3.5
├─ otters─0.2.10
│ ├─ dynamic_compile─1.0.0
│ └─ ibrowse─4.4.0
├─ ranch─1.2.1
└─ recon─2.3.2
└─ recon─2.3.4
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment