Skip to content
Closed
2 changes: 1 addition & 1 deletion code/common/dbwriteutils.q
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ manipulate:{[t;x]

/- post eod/replay, this is called after the date has been persisted to disk and sorted and
/- takes a directory (typically hdb directory) and partition value as parameters
postreplay:@[value;`postreplay;{[d;p] }];
postreplay:@[value;`postreplay;{[e] {[d;p] }}];

/ - functions for running and descriptively logging garbage collection
\d .gc
Expand Down
2 changes: 1 addition & 1 deletion code/common/html.q
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ add:{$[(count w x)>i:w[x;;0]?.z.w;.[`.u.w;(x;i;1);union;y];w[x],:enlist(.z.w;y)]

sub:{if[x~`;:sub[;y]each t];if[not x in t;'x];del[x].z.w;add[x;y]}
// add wssub method - have to subscribe to everything, don't return anything
wssub:{sub[x;`];}
wssub:{if[x~`;.z.s each t;:(::)];if[not x in t;'x];del[x].z.w;w[x],:enlist(.z.w;`);}

end:{(neg union/[w[;;0]])@\:(`.u.end;x)}

Expand Down
2 changes: 1 addition & 1 deletion code/handlers/trackservers.q
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ getdetails:{(.z.f;.z.h;system"p";@[value;`.proc.procname;`];@[value;`.proc.proct
/ add session behind a handle
addhw:{[hpuP;W]
// Get the information around a process
info:`f`h`port`procname`proctype`attributes!(@[W;({$[`getdetails in key`.servers;.servers.getdetails[];(.z.f;.z.h;system"p";`;`;$[`getattributes in key`.proc;.proc.getattributes[];()!()])]};`);(`;`;0Ni;`;`;()!())]);
info:`f`h`port`procname`proctype`attributes!(@[W;({$[`getdetails in key`.servers;.servers.getdetails[];(.z.f;.z.h;system"p";@[value;`.proc.procname;`];@[value;`.proc.proctype;`];$[`getattributes in key`.proc;.proc.getattributes[];()!()])]};`);(`;`;0Ni;`;`;()!())]);
if[0Ni~info`port;'"remote call failed on handle ",string W];
if[null name:info`procname;name:`$last("/"vs string info`f)except enlist""];
if[0=count name;name:`default];
Expand Down
17 changes: 12 additions & 5 deletions code/segmentedtickerplant/stplog.q
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ currlog:([tbl:`symbol$()]logname:`symbol$();handle:`int$())

// View of log file handles for faster lookups
loghandles::exec tbl!handle from currlog
// Re-establish the view above. A chained tickerplant which is not creating logs replaces it with a dictionary of
// no-ops (see init); without this, switching that process to create its own logs opened them but wrote nothing
restoreloghandles:{value "loghandles::exec tbl!handle from currlog"};

\d .stplg

Expand Down Expand Up @@ -184,7 +187,8 @@ endofdaydata:@[value;`.stplg.endofdaydata;{ {`proctype`procname`tables!(.proc.pr
// passes on eop messages to subscribers and rolls logs
endofperiod:{[currentpd;nextpd;data]
.lg.o[`endofperiod;"flushing remaining data to subscribers and clearing tables"];
.stpps.pubclear[.stplg.t];
// the published tables only: pubclear resets a table from the publish schemas, which have no entry for logmsg
.stpps.pubclear[.stpps.t];
.lg.o[`endofperiod;"executing end of period for ",.Q.s1 `currentperiod`nextperiod!(currentpd;nextpd)];
.stpps.endp[currentpd;nextpd;data]; // sends endofperiod message to subscribers
currperiod::nextpd; // increments current period
Expand All @@ -195,7 +199,8 @@ endofperiod:{[currentpd;nextpd;data]
// eop log roll is stopped if eod is also going to be triggered (roll is not stopped in SCTP)
stpeoperiod:{[currentpd;nextpd;data;rolllogs]
.lg.o[`endofperiod;"flushing remaining data to subscribers and clearing tables"];
.stpps.pubclear[.stplg.t];
// the published tables only: pubclear resets a table from the publish schemas, which have no entry for logmsg
.stpps.pubclear[.stpps.t];
.lg.o[`stpeoperiod;"passing on endofperiod message to subscribers"];
.stpps.endp[currentpd;nextpd;data]; // sends endofperiod message to subscribers
currperiod::nextperiod; // increments current period
Expand All @@ -215,7 +220,8 @@ periodrollover:{[data]
// common eod for STP and SCTP to send out eod messages and roll logs
endofday:{[date;data]
.lg.o[`endofday;"flushing remaining data to subscribers and clearing tables"];
.stpps.pubclear[.stplg.t];
// the published tables only: pubclear resets a table from the publish schemas, which have no entry for logmsg
.stpps.pubclear[.stpps.t];
.lg.o[`endofday;"executing end of day for ",.Q.s1 .eodtime.d];
.stpps.end[date;data]; // sends endofday message to subscribers
dayrollover[data];
Expand Down Expand Up @@ -259,6 +265,7 @@ init:{[dbname]
seqnum::0;

if[(value `..createlogs) or .sctp.loggingmode=`create;
if[.sctp.chainedtp;`.[`restoreloghandles][]];
createdld[dbname;.eodtime.d];
openlog[multilog;dldir;;.z.p+.eodtime.dailyadj]each logtabs;
// If appropriate, roll error log
Expand Down Expand Up @@ -294,6 +301,6 @@ init:{[dbname]
// exit before logs are touched if process is an sctp NOT in create mode
if[.sctp.chainedtp and not .sctp.loggingmode=`create; :()];
.lg.o[`stpexit;"Closing off log files"];
.stpm.updmeta[.stplg.multilog][`close;.stpps.t;.z.p];
.stplg.closelog each .stpps.t;
.stpm.updmeta[.stplg.multilog][`close;.stplg.logtabs;.z.p];
.stplg.closelog each .stplg.logtabs;
}]
4 changes: 3 additions & 1 deletion tests/helperfunctions.q
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ isalive:{[proc] any "q" in' @[system;"pgrep -lf ",proc," -u $USER";" "]};

// Have slightly more fluid handle opening mechanic - update: force it to open a new handle each time
gethandle:{[name]
.z.pc exec first w from .servers.SERVERS where procname=name;
.z.pc h:exec first w from .servers.SERVERS where procname=name;
// close the old handle as well: .z.pc only marks it closed, and a process can run out of connections
if[not null h;@[hclose;h;()]];
exec first w from .servers.getservers[`procname;name;()!();1b;1b]
};
4 changes: 3 additions & 1 deletion tests/merge/tplogreplay/settings.q
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ hdbdir:getenv[`KDBTESTS],"/merge/tplogreplay/testhdb"
schemafile:getenv[`KDBTESTS],"/merge/tplogreplay/database.q"
tplogdir:getenv[`KDBTESTS],"/merge/tplogreplay/testlogs"
processfile:getenv[`KDBCODE],"/processes/tickerlogreplay.q"
testconfig:getenv[`KDBTESTS],"/merge/tplogreplay/treplaysettings.q"
testconfig:getenv[`KDBTESTS],"/merge/tplogreplay/tpreplaysettings.q"

// system commands to run tickerlogreplay script with different merge methods
colreplay:{system"q torq.q -debug -load ",processfile," ",testconfig," -.replay.tplogdir ",tplogdir," -.replay.hdbdir ",hdbdir," -.replay.schemafile ", schemafile," -.replay.mergemethod col -proctype tickerlogreplay -procname tplogreplay1"};
Expand All @@ -20,6 +20,8 @@ hybridreplay:{system"q torq.q -debug -load ",processfile," ",testconfig," -.repl
.replay.autoreplay:0b
.replay.tplogdir: `$tplogdir
.replay.hdbdir: `$hdbdir
// the checks look at .replay.tempdir here, so point it at the temp directory tpreplaysettings.q gives the replay
.replay.tempdir:hsym `$tempdir
.replay.schemafile: `$schemafile
//dropping the tables that are not replayed by log files needed to get use function for names of stp logs
.replay.tablestoreplay:3_tables[]
9 changes: 9 additions & 0 deletions tests/monitor/monitor.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
action,ms,bytes,lang,code,repeat,minver,comment
before,0,0,q,.servers.startup[],1,,"Start TorQ connection management"
before,0,0,q,monHandle:gethandle[`monitor1],1,,"Open monitor handle"
true,0,0,q,@[{monHandle"start[]";1b};::;0b],1,,"start runs: .html.wssub subscribes lmchart, a function (it used to stop with 'type)"
run,0,0,q,"monHandle""start[]""",1,,"Call start again, as a refresh of the page does"
true,0,0,q,(1 1 1)~count each monHandle(`.html.w;monsubs),1,,"Calling start twice leaves one subscription each"
true,0,0,q,"all {(-6h=type x 0) and ` ~ x 1} each raze monHandle(`.html.w;monsubs)",1,,"Each subscription is the handle and ` (all syms), as the original wssub registers for a table"
true,0,0,q,"@[{monHandle(`.html.wssub;`);1b};::;0b]",1,,"wssub ` subscribes every value the monitor publishes (it used to stop with 'type)"
true,0,0,q,"0b~@[{monHandle(`.html.wssub;`nosuch);1b};::;0b]",1,,"wssub of a name the monitor does not publish is rejected, as before"
3 changes: 3 additions & 0 deletions tests/monitor/process.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
host,port,proctype,procname,U,localtime,g,T,w,load,startwithall,extras,qcmd
localhost,{KDBBASEPORT}+100,discovery,discovery1,${TORQHOME}/appconfig/passwords/accesslist.txt,1,0,,,${KDBCODE}/processes/discovery.q,1,,q
localhost,{KDBBASEPORT}+101,monitor,monitor1,${TORQHOME}/appconfig/passwords/accesslist.txt,1,0,,,${KDBCODE}/processes/monitor.q,1,,q
23 changes: 23 additions & 0 deletions tests/monitor/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash

# Handle command-line arguments
source $KDBTESTS/flagparse.sh

# Path to test directory
testpath=${KDBTESTS}/monitor

# Start procs
${TORQHOME}/torq.sh start discovery1 monitor1 -csv ${testpath}/process.csv

# Start test proc
/usr/bin/rlwrap q ${TORQHOME}/torq.q \
-proctype test -procname test1 \
-test ${testpath} \
-load ${KDBTESTS}/helperfunctions.q ${testpath}/settings.q \
-testresults ${KDBTESTS}/monitor/results/ \
-runtime $run \
-procfile ${testpath}/process.csv \
$debug $stop $write $quiet

# Shut down procs
${TORQHOME}/torq.sh stop discovery1 monitor1 -csv ${testpath}/process.csv
7 changes: 7 additions & 0 deletions tests/monitor/settings.q
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// IPC connection parameters
.servers.CONNECTIONS:`monitor;
.servers.USERPASS:`admin:admin;

// the monitor's web page calls start on every connection, which subscribes these with .html.wssub
// (heartbeat and logmsg are tables, lmchart is a function)
monsubs:`heartbeat`logmsg`lmchart;
1 change: 1 addition & 0 deletions tests/stp/batching/defbatch.csv
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,6 @@ run,0,0,q,![-11;] each logs,1,,"Replay logs locally"
true,0,0,q,(l1+11)~l2:count trade,1,,"Check logs contain both batches"
true,0,0,q,(c1+10)~c2:rdbHandle"count trade",1,,"Check first batch was successfully replayed from log"
run,0,0,q,stpHandle".z.ts[]",1,,"Resume publication"
run,0,0,q,system "sleep 1",1,,"Give data a chance to publish"
true,0,0,q,(c2+1)~rdbHandle"count trade",1,,"Check second batch gets published"
after,0,0,q,delete from `trade,1,,"Clear local trade table"
2 changes: 1 addition & 1 deletion tests/stp/chainedeod/eodroutine.csv
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ true,0,0,q,1=counttplogs[`stptest1],1,,"Should be 1 log directory for STP"
true,0,0,q,1=counttplogs[`sctptest1],1,,"Should be 1 log directory for SCTP"
run,0,0,q,now:.z.p,1,,"Get current time"
run,0,0,q,data:stpHandle".stplg.endofdaydata[]",1,,"get data"
run,0,0,q,"stpHandle(`.stplg.stpeod;.eodtime.d;data,(enlist `p)!enlist now)",1,,"Run EoD function on STP"
run,0,0,q,"stpHandle(`.stplg.endofday;.eodtime.d;data,(enlist `p)!enlist now)",1,,"Run EoD function on STP"
true,0,0,q,all 0 = sctpHandle"count each `. .stpps.t",1,,"Check tables have been flushed"
run,0,0,q,meta2:get .Q.dd[sctpDir1;`stpmeta],1,,"Get meta table from disk"
run,0,0,q,stpEod2:stpHandle".eodtime.d",1,,"Get new date on STP"
Expand Down
4 changes: 2 additions & 2 deletions tests/stp/chainedeod/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ ${TORQHOME}/torq.sh start discovery1 stptest1 sctptest1 rdb1 -csv ${testpath}/pr
-proctype test -procname test1 \
-test ${testpath} \
-load ${KDBTESTS}/helperfunctions.q ${testpath}/settings.q \
-results ${KDBTESTS}/stp/results/ \
-testresults ${KDBTESTS}/stp/results/ \
-procfile ${testpath}/process.csv \
-runtime $run \
$debug $stop $quiet
$debug $stop $write $quiet

# Shut down procs
${TORQHOME}/torq.sh stop discovery1 stptest1 sctptest1 rdb1 -csv ${testpath}/process.csv
4 changes: 2 additions & 2 deletions tests/stp/chainedeodlognone/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ ${TORQHOME}/torq.sh start discovery1 stptest1 sctptest1 rdb1 -csv ${testpath}/pr
-proctype test -procname test1 \
-test ${testpath} \
-load ${KDBTESTS}/helperfunctions.q ${testpath}/settings.q \
-results ${KDBTESTS}/stp/results/ \
-testresults ${KDBTESTS}/stp/results/ \
-procfile ${testpath}/process.csv \
-runtime $run \
$debug $stop $quiet
$debug $stop $write $quiet

# Shut down procs
${TORQHOME}/torq.sh stop discovery1 stptest1 sctptest1 rdb1 -csv ${testpath}/process.csv
2 changes: 1 addition & 1 deletion tests/stp/chainedeodlognone/sctplognone.csv
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ true,0,0,q,all rdbHandle"{count value x} each `trade`quote",1,,"Both trade & quo
run,0,0,q,data:stpHandle".stplg.endofdaydata[]",1,,"get data"
true,0,0,q,1=counttplogs[`stptest1],1,,"Should be 1 log directory for STP"
true,0,0,q,0=counttplogs[`sctptest1],1,,"Should be 0 log directories for SCTP"
run,0,0,q,"stpHandle(`.stplg.stpeod;.eodtime.d;data,(enlist `p)!enlist .z.p)",1,,"Run EoD function on STP"
run,0,0,q,"stpHandle(`.stplg.endofday;.eodtime.d;data,(enlist `p)!enlist .z.p)",1,,"Run EoD function on STP"
true,0,0,q,all 0 = sctpHandle"count each `. .stpps.t",1,,"Check tables have been flushed"
run,0,0,q,stpEod2:stpHandle".eodtime.d",1,,"Get new date on STP"
run,0,0,q,sctpEod2:sctpHandle".eodtime.d",1,,"Get new date on SCTP"
Expand Down
4 changes: 2 additions & 2 deletions tests/stp/chainedlogmodes/eodroutine.csv
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ true,0,0,q,all 0=(enlist rdbHandle) @\: (`.tst.endp),1,,"Check the endofperiod f
run,0,0,q,sctpHandle".z.exit[0i]",1,,"check that sctp can exit cleanly in parent mode"
run,0,0,q,now:.z.p,1,,"Get current time"
run,0,0,q,data:stpHandle".stplg.endofdaydata[]",1,,"get data"
run,0,0,q,"stpHandle(`.stplg.stpeod;.eodtime.d;data,(enlist `p)!enlist now)",1,,"Run EoD function on STP"
run,0,0,q,"stpHandle(`.stplg.endofday;.eodtime.d;data,(enlist `p)!enlist now)",1,,"Run EoD function on STP"
true,0,0,q,all 0 = sctpHandle"count each `. .stpps.t",1,,"Check tables have been flushed"
run,0,0,q,eod2:stpHandle".eodtime.d",1,,"Get new date"
true,0,0,q,rdbHandle".tst.eod",1,,"Check EoD was triggered on the sub"
Expand All @@ -43,7 +43,7 @@ true,0,0,q,all 0 = sctpHandle"count each `. .stpps.t",1,,"Check tables have been
true,0,0,q,all 1=(enlist rdbHandle) @\: (`.tst.endp),1,,"Check the endofperiod function has been triggered once on all subs"
run,0,0,q,now:.z.p,1,,"Get current time"
run,0,0,q,data:stpHandle".stplg.endofdaydata[]",1,,"get data"
run,0,0,q,"stpHandle(`.stplg.stpeod;.eodtime.d;data,(enlist `p)!enlist now)",1,,"Run EoD function on STP"
run,0,0,q,"stpHandle(`.stplg.endofday;.eodtime.d;data,(enlist `p)!enlist now)",1,,"Run EoD function on STP"
true,0,0,q,all 0 = sctpHandle"count each `. .stpps.t",1,,"Check tables have been flushed"
run,0,0,q,eod2:stpHandle".eodtime.d",1,,"Get new date"
true,0,0,q,rdbHandle".tst.eod",1,,"Check EoD was triggered on the sub"
Expand Down
4 changes: 2 additions & 2 deletions tests/stp/chainedlogmodes/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ ${TORQHOME}/torq.sh start discovery1 stp1 sctp1 rdb1 -csv ${testpath}/process.cs
-proctype test -procname test1 \
-test ${testpath} \
-load ${KDBTESTS}/helperfunctions.q ${testpath}/settings.q \
-results ${KDBTESTS}/stp/results/ \
-testresults ${KDBTESTS}/stp/results/ \
-procfile ${testpath}/process.csv \
-runtime $run \
$debug $stop $quiet
$debug $stop $write $quiet

# Shut down procs
${TORQHOME}/torq.sh stop discovery1 stp1 sctp1 rdb1 -csv ${testpath}/process.csv
10 changes: 5 additions & 5 deletions tests/stp/chainedperiodend/endp.csv
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,20 @@ before,0,0,q,sctpHandle".sctp.loggingmode:`create",1,,"Let SCTP create logs"
before,0,0,q,sctpHandle(`.stplg.init;testlogdb),1,,"Switch test stplog directory"
before,0,0,q,rdbHandles:`all`sym`tab!gethandle each `rdball`rdbsymfilt`rdbonetab,1,,"Get RDB handles"
before,0,0,q,(value rdbHandles) @\: (set;`endofperiod;endp),1,,"Set dummy endofperiod function on each sub"
before,0,0,q,tcount:count tabs:sctpHandle".stpps.t",1,,"Get number of tables"
before,0,0,q,tcount:count tabs:sctpHandle".stplg.logtabs",1,,"Get number of tables"
before,0,0,q,logperiod:sctpHandle".stplg.multilogperiod",1,,"Get logging period"
before,0,0,q,metacount:sctpHandle"count .stpm.metatable",1,,"Get initial table count"
before,0,0,q,mstarts:sctpHandle"neg[count .stpps.t]#exec start from .stpm.metatable",1,,"Get most recent start times"
before,0,0,q,mstarts:sctpHandle"neg[count .stplg.logtabs]#exec start from .stpm.metatable",1,,"Get most recent start times"
before,0,0,q,mseq:sctpHandle"exec last seq from .stpm.metatable",1,,"Get most recent sequence number"
before,0,0,q,period:`curr`next!sctpHandle".stplg[`currperiod`nextperiod]",1,,"Get current and next roll periods"
before,0,0,q,system "sleep 11",1,,"Wait for a full period"
true,0,0,q,all 0 = sctpHandle"count each `. .stpps.t",1,,"Check tables have been flushed"
run,0,0,q,mends:(sctpHandle"neg[2*count .stpps.t]#exec end from .stpm.metatable") except 0Np,1,,"Get previous period end times"
true,0,0,q,all 0 = sctpHandle"count each `. .stplg.logtabs",1,,"Check tables have been flushed"
run,0,0,q,mends:(sctpHandle"neg[2*count .stplg.logtabs]#exec end from .stpm.metatable") except 0Np,1,,"Get previous period end times"
run,0,0,q,currlog:sctpHandle"currlog",1,,"Get currlog table"
true,0,0,q,all 0=(value rdbHandles) @\: (`.tst.endp),1,,"Check the endofperiod function has been triggered once on all subs"
true,0,0,q,(metacount+tcount)~sctpHandle"count .stpm.metatable",1,,"Check that the STP metatable count has increased correctly"
true,0,0,q,all 1e6>abs "i"$logperiod-mends-mstarts,1,,"Check that the new metatable periods are within 1 microsec of the stated period"
true,0,0,q,(mseq+1h)~sctpHandle"exec last seq from .stpm.metatable",1,,"Check that the sequence number has incremented by 1"
true,0,0,q,tabs~raze sctpHandle"exec neg[count .stpps.t]#tbls from .stpm.metatable",1,,"Check that the correct tables are incremented"
true,0,0,q,tabs~raze sctpHandle"exec neg[count .stplg.logtabs]#tbls from .stpm.metatable",1,,"Check that the correct tables are incremented"
true,0,0,q,("T"$-6#string currlog[`trade;`logname])~"t"$period`next,1,,"Check trade log name rolled"
after,0,0,q,"system ""rm -rf "",1_string sctpHandle(`.stplg.dldir)",1,,"Delete logs folder"
4 changes: 2 additions & 2 deletions tests/stp/chainedperiodend/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ ${TORQHOME}/torq.sh start discovery1 stp1 sctp1 rdball rdbsymfilt rdbonetab -cs
-proctype test -procname test1 \
-test ${testpath} \
-load ${KDBTESTS}/helperfunctions.q ${testpath}/settings.q \
-results ${KDBTESTS}/stp/results/ \
-testresults ${KDBTESTS}/stp/results/ \
-procfile ${testpath}/process.csv \
-runtime $run \
$debug $stop $quiet
$debug $stop $write $quiet

# Shut down procs
${TORQHOME}/torq.sh stop discovery1 stp1 sctp1 rdball rdbsymfilt rdbonetab -csv ${testpath}/process.csv
4 changes: 2 additions & 2 deletions tests/stp/chainedrecovery/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ ${TORQHOME}/torq.sh start discovery1 -csv ${testpath}/process.csv
-proctype test -procname test1 \
-test ${testpath} \
-load ${KDBTESTS}/helperfunctions.q ${testpath}/settings.q \
-results ${KDBTESTS}/stp/results/ \
-testresults ${KDBTESTS}/stp/results/ \
-runtime $run \
-procfile ${testpath}/process.csv \
$debug $stop $quiet
$debug $stop $write $quiet

# Shut down procs
${TORQHOME}/torq.sh stop discovery1 stp1 stptabperiod rdball rdbsymfilt rdbcomplexfilt -csv ${testpath}/process.csv
2 changes: 1 addition & 1 deletion tests/stp/chainedstp/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ ${TORQHOME}/torq.sh start discovery1 stp1 sctp1 -csv ${KDBTESTS}/stp/chainedstp/
-proctype test -procname test1 \
-test ${testpath} \
-load ${KDBTESTS}/helperfunctions.q ${testpath}/settings.q \
-results ${KDBTESTS}/stp/results/ \
-testresults ${KDBTESTS}/stp/results/ \
-runtime $run \
-procfile ${testpath}/process.csv \
$debug $stop $write $quiet
Expand Down
6 changes: 6 additions & 0 deletions tests/stp/custommode/database.q
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// Schema for this suite: it needs these five tables whatever the application's own schema file defines
quote:([]time:`timestamp$(); sym:`g#`symbol$(); bid:`float$(); ask:`float$(); bsize:`long$(); asize:`long$(); mode:`char$(); ex:`char$(); src:`symbol$())
trade:([]time:`timestamp$(); sym:`g#`symbol$(); price:`float$(); size:`int$(); stop:`boolean$(); cond:`char$(); ex:`char$();side:`symbol$())
quote_iex:([]time:`timestamp$(); sym:`g#`symbol$(); bid:`float$(); ask:`float$(); bsize:`long$(); asize:`long$(); mode:`char$(); ex:`char$(); srctime:`timestamp$())
trade_iex:([]time:`timestamp$(); sym:`g#`symbol$(); price:`float$(); size:`int$(); stop:`boolean$(); cond:`char$(); ex:`char$(); srctime:`timestamp$())
heartbeat:([]time:`timestamp$(); sym:`symbol$(); procname:`symbol$(); counter:`long$(); pid:`int$(); host:`$(); port:`int$())
Loading