Compare commits
1 Commits
developmen
...
user/tmacr
Author | SHA1 | Date |
---|---|---|
Taylor McKinnon | 64bf9fc2e4 |
|
@ -24,6 +24,7 @@
|
||||||
SAVE 'context' STORE
|
SAVE 'context' STORE
|
||||||
<%
|
<%
|
||||||
'getMetricsAt' SECTION
|
'getMetricsAt' SECTION
|
||||||
|
'total' CHRONOSTART
|
||||||
|
|
||||||
JSON-> 'operation_info' STORE
|
JSON-> 'operation_info' STORE
|
||||||
JSON-> 'auth_info' STORE
|
JSON-> 'auth_info' STORE
|
||||||
|
@ -54,6 +55,7 @@
|
||||||
|
|
||||||
// Find all nodes containing snapshots
|
// Find all nodes containing snapshots
|
||||||
'load_snapshots' SECTION
|
'load_snapshots' SECTION
|
||||||
|
'load_snapshots' CHRONOSTART
|
||||||
|
|
||||||
// Define our macro to sum the snapshots and save their timestamp
|
// Define our macro to sum the snapshots and save their timestamp
|
||||||
<%
|
<%
|
||||||
|
@ -73,6 +75,7 @@
|
||||||
[ $tick NaN NaN NaN NULL ]
|
[ $tick NaN NaN NaN NULL ]
|
||||||
%> 'sumSnapshot' STORE
|
%> 'sumSnapshot' STORE
|
||||||
|
|
||||||
|
'fetch_snapshots' CHRONOSTART
|
||||||
// Fetch the last snapshot for every node
|
// Fetch the last snapshot for every node
|
||||||
{
|
{
|
||||||
'token' $read_token
|
'token' $read_token
|
||||||
|
@ -81,6 +84,7 @@
|
||||||
'end' $endTimestamp
|
'end' $endTimestamp
|
||||||
'count' 1
|
'count' 1
|
||||||
} FETCH
|
} FETCH
|
||||||
|
'fetch_snapshots' CHRONOEND
|
||||||
|
|
||||||
// Apply our macro over the snapshots
|
// Apply our macro over the snapshots
|
||||||
// Drop the result as we don't need it
|
// Drop the result as we don't need it
|
||||||
|
@ -92,7 +96,10 @@
|
||||||
] REDUCE
|
] REDUCE
|
||||||
DROP
|
DROP
|
||||||
|
|
||||||
|
'load_snapshots' CHRONOEND
|
||||||
|
|
||||||
'load_checkpoints' SECTION
|
'load_checkpoints' SECTION
|
||||||
|
'load_checkpoints' CHRONOSTART
|
||||||
|
|
||||||
{} 'checkpoints' STORE
|
{} 'checkpoints' STORE
|
||||||
|
|
||||||
|
@ -121,6 +128,7 @@
|
||||||
<% DUP TYPEOF 'LONG' != %>
|
<% DUP TYPEOF 'LONG' != %>
|
||||||
<% DROP -1 %> IFT
|
<% DROP -1 %> IFT
|
||||||
'startTimestamp' STORE
|
'startTimestamp' STORE
|
||||||
|
'fetch_checkpoint' $key '_' 2 JOIN CHRONOSTART
|
||||||
{
|
{
|
||||||
'token' $read_token
|
'token' $read_token
|
||||||
'class' $checkpoint_class
|
'class' $checkpoint_class
|
||||||
|
@ -128,6 +136,7 @@
|
||||||
'end' $endTimestamp
|
'end' $endTimestamp
|
||||||
'start' $startTimestamp 1 +
|
'start' $startTimestamp 1 +
|
||||||
} FETCH
|
} FETCH
|
||||||
|
'fetch_checkpoint' $key '_' 2 JOIN CHRONOEND
|
||||||
|
|
||||||
|
|
||||||
%> FOREACH
|
%> FOREACH
|
||||||
|
@ -159,6 +168,7 @@
|
||||||
|
|
||||||
// Load the most recent master checkpoint before our target timestamp from each node
|
// Load the most recent master checkpoint before our target timestamp from each node
|
||||||
{} 'masterCheckpoints' STORE
|
{} 'masterCheckpoints' STORE
|
||||||
|
'fetch_master_checkpoint' CHRONOSTART
|
||||||
{
|
{
|
||||||
'token' $read_token
|
'token' $read_token
|
||||||
'class' $master_checkpoint_class
|
'class' $master_checkpoint_class
|
||||||
|
@ -167,6 +177,7 @@
|
||||||
'count' 1
|
'count' 1
|
||||||
}
|
}
|
||||||
FETCH
|
FETCH
|
||||||
|
'fetch_master_checkpoint' CHRONOEND
|
||||||
<%
|
<%
|
||||||
$masterCheckpoints SWAP
|
$masterCheckpoints SWAP
|
||||||
DUP LASTTICK SWAP
|
DUP LASTTICK SWAP
|
||||||
|
@ -178,8 +189,11 @@
|
||||||
// $masterCheckpoints ->JSON + LOGMSG
|
// $masterCheckpoints ->JSON + LOGMSG
|
||||||
// $labels ->JSON LOGMSG
|
// $labels ->JSON LOGMSG
|
||||||
|
|
||||||
|
'load_checkpoints' CHRONOEND
|
||||||
|
|
||||||
// Find all nodes containing events
|
// Find all nodes containing events
|
||||||
'load_events' SECTION
|
'load_events' SECTION
|
||||||
|
'load_events' CHRONOSTART
|
||||||
[
|
[
|
||||||
$read_token
|
$read_token
|
||||||
$event_class
|
$event_class
|
||||||
|
@ -200,6 +214,7 @@
|
||||||
<% DUP TYPEOF 'LONG' != %>
|
<% DUP TYPEOF 'LONG' != %>
|
||||||
<% DROP -1 %> IFT
|
<% DROP -1 %> IFT
|
||||||
'startTimestamp' STORE
|
'startTimestamp' STORE
|
||||||
|
'fetch_events' $key '_' 2 JOIN CHRONOSTART
|
||||||
{
|
{
|
||||||
'token' $read_token
|
'token' $read_token
|
||||||
'class' $event_class
|
'class' $event_class
|
||||||
|
@ -207,6 +222,7 @@
|
||||||
'end' $endTimestamp
|
'end' $endTimestamp
|
||||||
'start' $startTimestamp 1 +
|
'start' $startTimestamp 1 +
|
||||||
} FETCH
|
} FETCH
|
||||||
|
'fetch_events' $key '_' 2 JOIN CHRONOEND
|
||||||
<% // Handle multiple GTS
|
<% // Handle multiple GTS
|
||||||
VALUES
|
VALUES
|
||||||
<%
|
<%
|
||||||
|
@ -238,10 +254,12 @@
|
||||||
%> FOREACH
|
%> FOREACH
|
||||||
%> FOREACH
|
%> FOREACH
|
||||||
|
|
||||||
|
'load_events' CHRONOEND
|
||||||
// $results ->JSON LOGMSG
|
// $results ->JSON LOGMSG
|
||||||
|
|
||||||
// Find all nodes containing corrections
|
// Find all nodes containing corrections
|
||||||
'load_corrections' SECTION
|
'load_corrections' SECTION
|
||||||
|
'load_corrections' CHRONOSTART
|
||||||
[
|
[
|
||||||
$read_token
|
$read_token
|
||||||
$correction_class
|
$correction_class
|
||||||
|
@ -264,6 +282,7 @@
|
||||||
<% DUP TYPEOF 'LONG' != %>
|
<% DUP TYPEOF 'LONG' != %>
|
||||||
<% DROP -1 %> IFT
|
<% DROP -1 %> IFT
|
||||||
'startTimestamp' STORE
|
'startTimestamp' STORE
|
||||||
|
'fetch_corrections' $key '_' 2 JOIN CHRONOSTART
|
||||||
{
|
{
|
||||||
'token' $read_token
|
'token' $read_token
|
||||||
'class' $correction_class
|
'class' $correction_class
|
||||||
|
@ -271,6 +290,7 @@
|
||||||
'end' $endTimestamp
|
'end' $endTimestamp
|
||||||
'start' $startTimestamp 1 +
|
'start' $startTimestamp 1 +
|
||||||
} FETCH
|
} FETCH
|
||||||
|
'fetch_corrections' $key '_' 2 JOIN CHRONOEND
|
||||||
|
|
||||||
<% // Handle multiple GTS
|
<% // Handle multiple GTS
|
||||||
DUP LASTTICK
|
DUP LASTTICK
|
||||||
|
@ -286,12 +306,15 @@
|
||||||
%> FOREACH
|
%> FOREACH
|
||||||
%> FOREACH
|
%> FOREACH
|
||||||
%> FOREACH
|
%> FOREACH
|
||||||
|
'load_corrections' CHRONOEND
|
||||||
|
|
||||||
'load_reindex' SECTION
|
'load_reindex' SECTION
|
||||||
|
'load_reindex' CHRONOSTART
|
||||||
<% $no_reindex NOT %>
|
<% $no_reindex NOT %>
|
||||||
<%
|
<%
|
||||||
// Only load the latest reindex for the current node
|
// Only load the latest reindex for the current node
|
||||||
$labels UNMAP 'node' $nodeID } 'filterLabels' STORE
|
$labels UNMAP 'node' $nodeID } 'filterLabels' STORE
|
||||||
|
'fetch_reindex' CHRONOSTART
|
||||||
{
|
{
|
||||||
'token' $read_token
|
'token' $read_token
|
||||||
'class' $reindex_class
|
'class' $reindex_class
|
||||||
|
@ -299,6 +322,7 @@
|
||||||
'end' $endTimestamp
|
'end' $endTimestamp
|
||||||
'count' 1
|
'count' 1
|
||||||
} FETCH
|
} FETCH
|
||||||
|
'fetch_reindex' CHRONOEND
|
||||||
// DUP 'Loaded reindex records ' SWAP ->JSON + LOGMSG
|
// DUP 'Loaded reindex records ' SWAP ->JSON + LOGMSG
|
||||||
<% // Handle multiple GTS
|
<% // Handle multiple GTS
|
||||||
VALUES
|
VALUES
|
||||||
|
@ -309,6 +333,10 @@
|
||||||
%> FOREACH
|
%> FOREACH
|
||||||
%> FOREACH
|
%> FOREACH
|
||||||
%> IFT
|
%> IFT
|
||||||
|
'load_reindex' CHRONOEND
|
||||||
|
'total' CHRONOEND
|
||||||
|
|
||||||
|
CHRONOSTATS ->JSON LOGMSG
|
||||||
|
|
||||||
$results // Leave results on the stack
|
$results // Leave results on the stack
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue