├── .gitattributes ├── .gitignore ├── LICENSE ├── README.md ├── bin ├── killprocess.sh └── launchprocess.sh ├── code ├── common │ ├── analyticslib.q │ ├── api.q │ ├── apidetails.q │ ├── async.q │ ├── bglaunchutils.q │ ├── cache.q │ ├── checkinputs.q │ ├── compress.q │ ├── dataaccess.q │ ├── datadog.q │ ├── dataloader.q │ ├── datareplay.q │ ├── dbwriteutils.q │ ├── email.q │ ├── eodtime.q │ ├── execas.q │ ├── finspace.q │ ├── grafana.q │ ├── heartbeat.q │ ├── help.q │ ├── html.q │ ├── json.k │ ├── kafka.q │ ├── memusage.q │ ├── merge.q │ ├── monitoringchecks.q │ ├── order.txt │ ├── os.q │ ├── pubsub.q │ ├── subscribercutoff.q │ ├── subscriptions.q │ ├── timer.q │ ├── timezone.q │ ├── tplogutils.q │ └── u.q ├── dataaccess │ ├── checkinputs.q │ ├── customfuncs.q │ ├── dataaccessutils.q │ ├── extractqueryparams.q │ ├── getdata.q │ ├── logs.q │ ├── queryorder.q │ └── schema.q ├── dqc │ ├── advanceddtd.q │ ├── attrcheck.q │ ├── chkslowsub.q │ ├── constructcheck.q │ ├── datechk.q │ ├── daytoday.q │ ├── dfilechk.q │ ├── freeform.q │ ├── infinitychk.q │ ├── memoryusage.q │ ├── nullchk.q │ ├── pctAvgDailyChange.q │ ├── rangechk.q │ ├── refdatacheck.q │ ├── schemacheck.q │ ├── symfilecheck.q │ ├── symfilegrowth.q │ ├── tablecomp.q │ ├── tablecount.q │ ├── tableticking.q │ ├── timediff.q │ └── xmarketalert.q ├── dqcommon │ ├── connection.q │ ├── loadcsv.q │ └── savedata.q ├── dqe │ ├── backfill.q │ ├── bucketcount.q │ ├── bycount.q │ ├── datecheck.q │ ├── groupcount.q │ ├── infinitycount.q │ ├── nullcount.q │ ├── symcount.q │ ├── symfilecheck.q │ └── tablecount.q ├── filealerter │ └── pcapdecoder.q ├── gateway │ ├── daqrest.q │ ├── dataaccess.q │ ├── gatewaylib.q │ └── kxdash.q ├── handlers │ ├── apidetails.q │ ├── controlaccess.q │ ├── dotz.q │ ├── finspaceservers.q │ ├── ldap.q │ ├── logusage.q │ ├── order.txt │ ├── permissions.q │ ├── trackclients.q │ ├── trackservers.q │ ├── writeaccess.q │ └── zpsignore.q ├── hdb │ └── hdbstandard.q ├── monitor │ ├── apidetails.q │ ├── checkmonitor.q │ └── datadogchecks.q ├── processes │ ├── chainedtp.q │ ├── compression.q │ ├── discovery.q │ ├── dqc.q │ ├── dqe.q │ ├── filealerter.q │ ├── gateway.q │ ├── housekeeping.q │ ├── idb.q │ ├── kill.q │ ├── monitor.q │ ├── rdb.q │ ├── reporter.q │ ├── segmentedtickerplant.q │ ├── tickerlogreplay.q │ ├── tickerplant.q │ └── wdb.q ├── profiler │ └── top.q ├── rdb │ ├── apidetails.q │ ├── endofperiod.q │ └── rdbstandard.q ├── segmentedtickerplant │ ├── pubsub.q │ ├── sctp.q │ ├── stplog.q │ └── stpmeta.q └── wdb │ ├── origstartup.q │ └── writedown.q ├── config ├── application.txt ├── compressionconfig.csv ├── dataaccess │ ├── checkinputs.csv │ ├── errormessages.csv │ ├── examples.csv │ └── tableproperties.csv ├── dependency.csv ├── dqcconfig.csv ├── dqedetail.csv ├── dqengineconfig.csv ├── filealerter.csv ├── housekeeping.csv ├── monitorconfig.csv ├── nontorqprocess.csv ├── passwords │ ├── chainedtp.txt │ ├── default.txt │ ├── discovery.txt │ ├── dqc.txt │ ├── dqcdb.txt │ ├── dqe.txt │ ├── dqedb.txt │ ├── filealerter.txt │ ├── gateway.txt │ ├── hdb.txt │ ├── housekeeping.txt │ ├── idb.txt │ ├── kill.txt │ ├── monitor.txt │ ├── rdb.txt │ ├── reporter.txt │ ├── segmentedtickerplant.txt │ ├── sort.txt │ ├── sortworker.txt │ ├── tickerplant.txt │ └── wdb.txt ├── permissions │ ├── default.q │ ├── default_functions.csv │ ├── default_hosts.csv │ ├── default_users.csv │ └── gateway_functions.csv ├── process.csv ├── reporter.csv ├── settings │ ├── chainedtp.q │ ├── compression.q │ ├── default.q │ ├── discovery.q │ ├── dqc.q │ ├── dqe.q │ ├── filealerter.q │ ├── gateway.q │ ├── hdb.q │ ├── housekeeping.q │ ├── idb.q │ ├── monitor.q │ ├── rdb.q │ ├── reporter.q │ ├── segmentedchainedtickerplant.q │ ├── segmentedtickerplant.q │ ├── sort.q │ ├── sortworker.q │ ├── tickerlogreplay.q │ ├── tickerplant.q │ └── wdb.q ├── sort.csv └── tzinfo ├── datadog ├── Example_TorQ_Monitoring_Dashboard.json ├── monitors │ └── monitors.zip └── setupdatadog.sh ├── docs ├── InstallGuide.md ├── Licenses-3rd-Party.txt ├── Overview.md ├── Processes.md ├── analyticslib.md ├── blog.md ├── cheatsheet.md ├── conn.md ├── dataaccess.md ├── gettingstarted.md ├── graphics │ ├── DataIntellect-TorQ-logo.png │ ├── DataIntellect-header-logo.jpg │ ├── Installscript_folder_structure.png │ ├── TorQ-Structure.png │ ├── async.png │ ├── create2.png │ ├── datadog1.png │ ├── datadog2.png │ ├── discovery1.png │ ├── discovery2.png │ ├── discovery3.png │ ├── favicon.ico │ ├── fullarchitecture.gliffy │ ├── fullarchitecture.png │ ├── fullarchitecture2.gliffy │ ├── fullarchitecture2.png │ ├── grafana_chart.png │ ├── idb.png │ ├── monitor_ui_running.png │ ├── parent3.png │ ├── reporter.png │ └── simpletickdiagram.png ├── handlers.md ├── index.md ├── monit.md ├── unittesting.md ├── utilities.md └── visualisation.md ├── html ├── css │ ├── bootstrap-theme.min.css │ ├── bootstrap.min.css │ ├── jquery.dataTables.css │ └── main.css ├── img │ ├── DataIntellect-TorQ-logo.png │ ├── favicon.ico │ ├── sort_asc.png │ ├── sort_asc_disabled.png │ ├── sort_both.png │ ├── sort_desc.png │ └── sort_desc_disabled.png ├── index.html └── js │ ├── kdbconnect.js │ ├── monitor.js │ ├── startmonitor.js │ └── vendor │ ├── bootstrap.js │ ├── bootstrap.min.js │ ├── c.js │ ├── d3.v3.min.js │ ├── jquery-1.11.0.min.js │ ├── jquery-ui-1.10.4.custom.min.js │ ├── jquery.dataTables.min.js │ ├── modernizr-2.6.2-respond-1.1.0.min.js │ └── modernizr-2.6.2.min.js ├── installtorqapp.sh ├── lib ├── l32 │ ├── libcrypto.so.1.0.0 │ ├── libcurl.so.4 │ ├── libssl.so.1.0.0 │ └── torQemail.so ├── l64 │ ├── kafkaq.so │ ├── kdbldap.so │ ├── libcrypto.so.1.0.0 │ ├── libcurl.so.4 │ ├── libssl.so.1.0.0 │ └── torQemail.so ├── m32 │ ├── libcurl.4.dylib │ └── torQemail.so ├── m64 │ ├── libcurl.4.dylib │ └── torQemail.so └── w32 │ ├── libcurl.dll │ ├── libeay32.dll │ ├── libssh2.dll │ ├── ssleay32.dll │ └── torQemail.dll ├── logs └── dummy.log ├── mkdocs.yml ├── monit ├── bin │ └── monit.sh └── templates │ ├── monitalert.cfg │ ├── monitrc │ └── monittemplate.txt ├── setenv.sh ├── tests ├── bglaunchprocess │ ├── process.csv │ ├── run.sh │ ├── settings.q │ └── test.csv ├── chainedtp │ ├── database.q │ ├── process.csv │ ├── run.sh │ ├── settings.q │ └── test.csv ├── dataaccess │ ├── checkinputs │ │ ├── checkinputs.csv │ │ ├── config │ │ │ ├── process.csv │ │ │ └── tableproperties.csv │ │ ├── run.sh │ │ ├── settings.q │ │ └── testdata │ │ │ ├── aggnumber.csv │ │ │ ├── aggregationcolumnsexist.csv │ │ │ ├── aggregationdistinct.csv │ │ │ ├── aggtimebar.csv │ │ │ ├── checkinputerrors.csv │ │ │ ├── columncheckffby.csv │ │ │ ├── columncheckffcolumn.csv │ │ │ ├── columncheckffwhere.csv │ │ │ ├── columnsexist.csv │ │ │ ├── dictfreeformby.csv │ │ │ ├── invalidaggregationfuncs.csv │ │ │ ├── invalidtimecolumn.csv │ │ │ ├── notffwhere.csv │ │ │ ├── operatorffwhere.csv │ │ │ ├── smalltimebar.csv │ │ │ ├── tableexists.csv │ │ │ ├── timebarexists.csv │ │ │ ├── timebarinvalid.csv │ │ │ ├── timebarmissingagg.csv │ │ │ ├── timebartype.csv │ │ │ ├── timecolumnexists.csv │ │ │ ├── validinput1.csv │ │ │ ├── validinput2.csv │ │ │ └── validinput3.csv │ ├── common │ │ ├── checkinputs.csv │ │ ├── config │ │ │ ├── process.csv │ │ │ └── tableproperties.csv │ │ ├── run.sh │ │ ├── settings.q │ │ └── testdata │ │ │ ├── aggregationdict.csv │ │ │ ├── aggregationkey.csv │ │ │ ├── aggregationvalues.csv │ │ │ ├── badordering.csv │ │ │ ├── checkinputerrors.csv │ │ │ ├── checktimeorder.csv │ │ │ ├── columntypes.csv │ │ │ ├── endtimetype.csv │ │ │ ├── filterequality.csv │ │ │ ├── filterformat.csv │ │ │ ├── filternot.csv │ │ │ ├── filterwithin.csv │ │ │ ├── freeformbytype.csv │ │ │ ├── freeformcolumntype.csv │ │ │ ├── freeformwheretype.csv │ │ │ ├── groupingtype.csv │ │ │ ├── instrumenttype.csv │ │ │ ├── invalidcomb1.csv │ │ │ ├── invalidcomb2.csv │ │ │ ├── invalidfilterkey.csv │ │ │ ├── invalidfilterop.csv │ │ │ ├── invalidfilterop1.csv │ │ │ ├── invalidparamnames.csv │ │ │ ├── multiparams.csv │ │ │ ├── noordering.csv │ │ │ ├── orderingordering.csv │ │ │ ├── orderingordering1.csv │ │ │ ├── orderingpairing.csv │ │ │ ├── postbackfail.csv │ │ │ ├── requiredparamsmissing.csv │ │ │ ├── starttimetype.csv │ │ │ ├── tablenametypeerror.csv │ │ │ ├── timebararg0.csv │ │ │ ├── timebararg1.csv │ │ │ ├── timebararg2.csv │ │ │ ├── timebarargstype.csv │ │ │ ├── timebarcount.csv │ │ │ ├── timecolumntype.csv │ │ │ ├── vagueordering.csv │ │ │ ├── validinput1.csv │ │ │ ├── validinput2.csv │ │ │ └── validinput3.csv │ ├── extractqueryparam │ │ ├── config │ │ │ ├── process.csv │ │ │ └── tableproperties.csv │ │ ├── extractqueryparam.csv │ │ ├── input │ │ │ ├── aggregations.csv │ │ │ ├── columns.csv │ │ │ ├── filters.csv │ │ │ ├── freeformfilters.csv │ │ │ ├── freeformselect.csv │ │ │ ├── grouping.csv │ │ │ ├── instrumentfilter.csv │ │ │ ├── query1.csv │ │ │ ├── string.csv │ │ │ └── timebucket.csv │ │ ├── output │ │ │ ├── aggregations.csv │ │ │ ├── columns.csv │ │ │ ├── filters.csv │ │ │ ├── freeformfilters.csv │ │ │ ├── freeformselect.csv │ │ │ ├── grouping.csv │ │ │ ├── instrumentfilter.csv │ │ │ ├── query1.csv │ │ │ ├── string.csv │ │ │ └── timebucket.csv │ │ ├── run.sh │ │ └── settings.q │ ├── gwquerytest │ │ ├── inputs │ │ │ ├── hdbproc.csv │ │ │ ├── mapreducemulti.csv │ │ │ ├── multiproc.csv │ │ │ ├── rdbproc.csv │ │ │ └── singleproc.csv │ │ ├── process.csv │ │ ├── rdbhelper.q │ │ ├── run.sh │ │ ├── settings.q │ │ └── test.csv │ ├── mockdata.q │ ├── queryorder │ │ ├── config │ │ │ ├── process.csv │ │ │ └── tableproperties.csv │ │ ├── hdb │ │ │ ├── 2021.01.04 │ │ │ │ ├── packets │ │ │ │ │ ├── .d │ │ │ │ │ ├── ack │ │ │ │ │ ├── data │ │ │ │ │ ├── dest │ │ │ │ │ ├── destport │ │ │ │ │ ├── flags │ │ │ │ │ ├── len │ │ │ │ │ ├── length │ │ │ │ │ ├── protocol │ │ │ │ │ ├── seq │ │ │ │ │ ├── src │ │ │ │ │ ├── srcport │ │ │ │ │ ├── sym │ │ │ │ │ ├── time │ │ │ │ │ ├── tsecr │ │ │ │ │ ├── tsval │ │ │ │ │ └── win │ │ │ │ └── quote │ │ │ │ │ ├── .d │ │ │ │ │ ├── asize │ │ │ │ │ ├── ask │ │ │ │ │ ├── bid │ │ │ │ │ ├── bsize │ │ │ │ │ ├── ex │ │ │ │ │ ├── mode │ │ │ │ │ ├── src │ │ │ │ │ ├── sym │ │ │ │ │ └── time │ │ │ ├── dbmaint.q │ │ │ └── sym │ │ ├── inputs │ │ │ ├── basicsymquery.csv │ │ │ ├── byandffby.csv │ │ │ ├── colsandffcols.csv │ │ │ ├── colsandffcols1.csv │ │ │ ├── dictionaryrename.csv │ │ │ ├── getdatabyclause.csv │ │ │ ├── getdatabyclause1.csv │ │ │ ├── hdbwherereorder.csv │ │ │ ├── listrename.csv │ │ │ ├── multiinstrumentquery.csv │ │ │ ├── partederror.csv │ │ │ ├── reorderby.csv │ │ │ ├── reorderwhere.csv │ │ │ ├── reorderwhere1.csv │ │ │ ├── timesortedhdb.csv │ │ │ └── unsortedhdb.csv │ │ ├── outputs │ │ │ ├── basicsymquery.csv │ │ │ ├── byandffby.csv │ │ │ ├── colsandffcols.csv │ │ │ ├── colsandffcols1.csv │ │ │ ├── dictionaryrename.csv │ │ │ ├── hdbwherereorder.csv │ │ │ ├── listrename.csv │ │ │ ├── multiinstrumentquery0.csv │ │ │ ├── multiinstrumentquery1.csv │ │ │ ├── reorderby.csv │ │ │ ├── reorderwhere.csv │ │ │ ├── reorderwhere1.csv │ │ │ ├── timesortedhdb.csv │ │ │ └── unsortedhdb.csv │ │ ├── queryorder.csv │ │ ├── run.sh │ │ └── settings.q │ └── settings.q ├── dqe │ ├── anomalychk.csv │ ├── attrcheck.csv │ ├── beforerun.csv │ ├── constructexists.csv │ ├── dupchk.csv │ ├── dupchktab │ ├── fillprocname.csv │ ├── freeform.csv │ ├── memoryusage.csv │ ├── nullchk.csv │ ├── rangechk.csv │ ├── refdatacheck.csv │ ├── schemacheck.csv │ ├── tablecount.csv │ ├── tableticking.csv │ └── xmarketalert.csv ├── flagparse.sh ├── gwtests.csv ├── helperfunctions.q ├── k4unit.q ├── k4unit │ ├── startupcycles │ │ ├── run_startupcycles.sh │ │ └── startupcycles.csv │ └── tests.csv ├── merge │ ├── tplogreplay │ │ ├── database.q │ │ ├── process.csv │ │ ├── run.sh │ │ ├── settings.q │ │ ├── sort.csv │ │ ├── testlogs │ │ │ ├── stp1_logmsg20220616122504 │ │ │ ├── stp1_packets20220616122504 │ │ │ ├── stp1_quote20220616122504 │ │ │ ├── stp1_quote_iex20220616122504 │ │ │ ├── stp1_segmentederrorlogfile20220616122504 │ │ │ ├── stp1_trade20220616122504 │ │ │ ├── stp1_trade_iex20220616122504 │ │ │ └── stpmeta │ │ ├── tests │ │ │ ├── col.csv │ │ │ ├── hybrid.csv │ │ │ └── part.csv │ │ └── tpreplaysettings.q │ └── wdb │ │ ├── config │ │ ├── process.csv │ │ ├── sort.csv │ │ └── wdbsettings.q │ │ ├── mockdata.q │ │ ├── run.sh │ │ ├── settings.q │ │ ├── tests │ │ ├── col.csv │ │ ├── hybrid.csv │ │ └── part.csv │ │ └── xdaily.q ├── order.txt ├── pcap │ ├── dummy.pcap │ ├── dummyfilealerter.csv │ ├── dummypacketstable │ ├── dummyquotetable │ ├── pcapdecoder.csv │ └── runpcaptests.sh ├── performance │ ├── code │ │ ├── consumer.q │ │ ├── feed.q │ │ ├── observer.q │ │ └── tick.q │ ├── run.sh │ └── settings │ │ ├── consumer.q │ │ ├── database.q │ │ ├── feed.q │ │ ├── observer.q │ │ ├── process.csv │ │ ├── testdb.q │ │ └── u.q ├── permissions │ └── permissions.csv ├── rdb │ ├── rdball.csv │ ├── rdbfilt.csv │ ├── rdbsub.csv │ ├── replaylog.csv │ └── runrdbtests.sh ├── rdbsub.csv ├── runall.q ├── runtests.q ├── schemas │ ├── insertdata.q │ ├── process.csv │ ├── run.sh │ ├── settings.q │ └── test.csv ├── stp │ ├── TestCases.csv │ ├── batching │ │ ├── defbatch.csv │ │ ├── immbatch.csv │ │ ├── membatch.csv │ │ ├── run.sh │ │ └── settings.q │ ├── chainedeod │ │ ├── eodroutine.csv │ │ ├── process.csv │ │ ├── run.sh │ │ └── settings.q │ ├── chainedeodlognone │ │ ├── process.csv │ │ ├── run.sh │ │ ├── sctplognone.csv │ │ └── settings.q │ ├── chainedlogmodes │ │ ├── eodroutine.csv │ │ ├── process.csv │ │ ├── run.sh │ │ └── settings.q │ ├── chainedperiodend │ │ ├── endp.csv │ │ ├── process.csv │ │ ├── run.sh │ │ └── settings.q │ ├── chainedrecovery │ │ ├── process.csv │ │ ├── run.sh │ │ ├── settings.q │ │ └── tabperiod.csv │ ├── chainedstp │ │ ├── process.csv │ │ ├── run.sh │ │ ├── settings.q │ │ ├── sub.csv │ │ └── subperiodic.csv │ ├── custommode │ │ ├── logs.csv │ │ ├── metaroll.csv │ │ ├── process.csv │ │ ├── run.sh │ │ └── settings.q │ ├── eod │ │ ├── eodroutine.csv │ │ ├── process.csv │ │ ├── run.sh │ │ └── settings.q │ ├── exit │ │ ├── exit.csv │ │ ├── process.csv │ │ ├── run.sh │ │ └── settings.q │ ├── housekeeping │ │ ├── logs │ │ │ └── logs │ │ │ │ ├── err20201006204448 │ │ │ │ ├── err20201006204450 │ │ │ │ ├── stpmeta │ │ │ │ ├── stpnone_20201006204448 │ │ │ │ └── stpnone_20201006204450 │ │ ├── run.sh │ │ ├── settings.q │ │ └── zippingtest.csv │ ├── idbdefault │ │ ├── config │ │ │ └── sort.csv │ │ ├── idbdefault.csv │ │ ├── process.csv │ │ ├── run.sh │ │ └── settings.q │ ├── idbpartbyenum │ │ ├── config │ │ │ └── sort.csv │ │ ├── idbenum.csv │ │ ├── process.csv │ │ ├── run.sh │ │ └── settings.q │ ├── periodend │ │ ├── endp.csv │ │ ├── process.csv │ │ ├── run.sh │ │ └── settings.q │ ├── pubsub │ │ ├── process.csv │ │ ├── ps.q │ │ ├── pubsub.csv │ │ ├── run.sh │ │ └── settings.q │ ├── recovery │ │ ├── process.csv │ │ ├── recoveryreplayperiod.csv │ │ ├── recoverysinglelog.csv │ │ ├── recoverytabperiod.csv │ │ ├── recoverytabular.csv │ │ ├── run.sh │ │ └── settings.q │ ├── stripe │ │ ├── performance │ │ │ ├── prep_test.q │ │ │ ├── run_perf_test.q │ │ │ └── stripe_performance.csv │ │ ├── process.csv │ │ ├── run.sh │ │ ├── settings.q │ │ └── stripe.csv │ ├── strsub │ │ ├── process.csv │ │ ├── run.sh │ │ ├── settings.q │ │ └── strsub.csv │ ├── subfile │ │ ├── process.csv │ │ ├── run.sh │ │ ├── settings.q │ │ └── subfilemissing.csv │ ├── subscription │ │ ├── process.csv │ │ ├── rdbsub.csv │ │ ├── run.sh │ │ ├── settings.q │ │ ├── sub.csv │ │ └── subperiodic.csv │ ├── tickerlog │ │ ├── alltabs.csv │ │ ├── dirload.csv │ │ ├── logs │ │ │ ├── oldlog │ │ │ │ └── testoldlog │ │ │ ├── oldlogdir │ │ │ │ ├── oldlog1 │ │ │ │ └── oldlog2 │ │ │ ├── stpnone │ │ │ │ ├── err20201006204448 │ │ │ │ ├── err20201006204450 │ │ │ │ ├── stpmeta │ │ │ │ ├── stpnone_20201006204448 │ │ │ │ └── stpnone_20201006204450 │ │ │ ├── stptabperiod │ │ │ │ ├── err20201006204518 │ │ │ │ ├── err20201006204520 │ │ │ │ ├── err20201006204522 │ │ │ │ ├── err20201006204524 │ │ │ │ ├── logmsg20201006204518 │ │ │ │ ├── logmsg20201006204520 │ │ │ │ ├── logmsg20201006204522 │ │ │ │ ├── logmsg20201006204524 │ │ │ │ ├── packets20201006204518 │ │ │ │ ├── packets20201006204520 │ │ │ │ ├── packets20201006204522 │ │ │ │ ├── packets20201006204524 │ │ │ │ ├── quote20201006204518 │ │ │ │ ├── quote20201006204520 │ │ │ │ ├── quote20201006204522 │ │ │ │ ├── quote20201006204524 │ │ │ │ ├── quote_iex20201006204518 │ │ │ │ ├── quote_iex20201006204520 │ │ │ │ ├── quote_iex20201006204522 │ │ │ │ ├── quote_iex20201006204524 │ │ │ │ ├── stpmeta │ │ │ │ ├── trade20201006204518 │ │ │ │ ├── trade20201006204520 │ │ │ │ ├── trade20201006204522 │ │ │ │ ├── trade20201006204524 │ │ │ │ ├── trade_iex20201006204518 │ │ │ │ ├── trade_iex20201006204520 │ │ │ │ ├── trade_iex20201006204522 │ │ │ │ └── trade_iex20201006204524 │ │ │ ├── stptabular │ │ │ │ ├── err20201006204546 │ │ │ │ ├── err20201006204548 │ │ │ │ ├── err20201006204550 │ │ │ │ ├── err20201006204552 │ │ │ │ ├── logmsg_20201006204546 │ │ │ │ ├── logmsg_20201006204548 │ │ │ │ ├── logmsg_20201006204550 │ │ │ │ ├── logmsg_20201006204552 │ │ │ │ ├── packets_20201006204546 │ │ │ │ ├── packets_20201006204548 │ │ │ │ ├── packets_20201006204550 │ │ │ │ ├── packets_20201006204552 │ │ │ │ ├── quote_20201006204546 │ │ │ │ ├── quote_20201006204548 │ │ │ │ ├── quote_20201006204550 │ │ │ │ ├── quote_20201006204552 │ │ │ │ ├── quote_iex_20201006204546 │ │ │ │ ├── quote_iex_20201006204548 │ │ │ │ ├── quote_iex_20201006204550 │ │ │ │ ├── quote_iex_20201006204552 │ │ │ │ ├── stpmeta │ │ │ │ ├── trade_20201006204546 │ │ │ │ ├── trade_20201006204548 │ │ │ │ ├── trade_20201006204550 │ │ │ │ ├── trade_20201006204552 │ │ │ │ ├── trade_iex_20201006204546 │ │ │ │ ├── trade_iex_20201006204548 │ │ │ │ ├── trade_iex_20201006204550 │ │ │ │ └── trade_iex_20201006204552 │ │ │ ├── zipdir │ │ │ │ ├── oldlog1.gz │ │ │ │ └── oldlog2.gz │ │ │ ├── zipdirstp │ │ │ │ ├── err20201006204518.gz │ │ │ │ ├── err20201006204520.gz │ │ │ │ ├── err20201006204522.gz │ │ │ │ ├── err20201006204524.gz │ │ │ │ ├── logmsg20201006204518.gz │ │ │ │ ├── logmsg20201006204520.gz │ │ │ │ ├── logmsg20201006204522.gz │ │ │ │ ├── logmsg20201006204524.gz │ │ │ │ ├── packets20201006204518.gz │ │ │ │ ├── packets20201006204520.gz │ │ │ │ ├── packets20201006204522.gz │ │ │ │ ├── packets20201006204524.gz │ │ │ │ ├── quote20201006204518.gz │ │ │ │ ├── quote20201006204520.gz │ │ │ │ ├── quote20201006204522.gz │ │ │ │ ├── quote20201006204524.gz │ │ │ │ ├── quote_iex20201006204518.gz │ │ │ │ ├── quote_iex20201006204520.gz │ │ │ │ ├── quote_iex20201006204522.gz │ │ │ │ ├── quote_iex20201006204524.gz │ │ │ │ ├── stpmeta.gz │ │ │ │ ├── trade20201006204518.gz │ │ │ │ ├── trade20201006204520.gz │ │ │ │ ├── trade20201006204522.gz │ │ │ │ ├── trade20201006204524.gz │ │ │ │ ├── trade_iex20201006204518.gz │ │ │ │ ├── trade_iex20201006204520.gz │ │ │ │ ├── trade_iex20201006204522.gz │ │ │ │ └── trade_iex20201006204524.gz │ │ │ └── zipfile │ │ │ │ └── testoldlog.gz │ │ ├── process.csv │ │ ├── run.sh │ │ ├── settings.q │ │ ├── subset.csv │ │ └── zipped.csv │ ├── tpvalidation │ │ ├── oldtp.csv │ │ ├── process.csv │ │ ├── run.sh │ │ └── settings.q │ ├── tz │ │ ├── process.csv │ │ ├── run.sh │ │ ├── settings.q │ │ ├── tz.csv │ │ ├── tzcustom.csv │ │ └── tzrolloffset.csv │ ├── upds │ │ ├── errorupds.csv │ │ ├── process.csv │ │ ├── run.sh │ │ ├── settings.q │ │ ├── testdatabase.q │ │ └── upds.csv │ └── wdb │ │ ├── config │ │ └── sort.csv │ │ ├── partbyenum.csv │ │ ├── process.csv │ │ ├── run.sh │ │ ├── settings.q │ │ ├── singlelog.csv │ │ ├── tabperiod.csv │ │ └── tabular.csv ├── stpcustom.csv └── wdb │ ├── intpartbyenum │ ├── database.q │ ├── intpartbyenum.csv │ ├── process.csv │ ├── run.sh │ ├── settings.q │ └── sort.csv │ ├── nullpartbyenum │ ├── config │ │ └── sort.csv │ ├── database.q │ ├── nullpartbyenum.csv │ ├── process.csv │ ├── run.sh │ └── settings.q │ ├── replay │ └── savetables_replay.csv │ └── timer │ └── savetables_timer.csv ├── torq.q └── torq.sh /.gitattributes: -------------------------------------------------------------------------------- 1 | *.q linguist-language=q 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | 3 | logs/* 4 | !logs/dummy.log 5 | 6 | tplogs/* 7 | -------------------------------------------------------------------------------- /code/common/execas.q: -------------------------------------------------------------------------------- 1 | \d .pm 2 | 3 | execas:{[f;u] 4 | $[`.pm.requ ~ key `.pm.requ;.pm.requ[u;f]; value f]} 5 | -------------------------------------------------------------------------------- /code/common/order.txt: -------------------------------------------------------------------------------- 1 | utils.q 2 | u.q 3 | u.k 4 | api.q 5 | apidetails.q 6 | timer.q 7 | pubsub.q 8 | subscriptions.q 9 | timezone.q 10 | eodtime.q 11 | -------------------------------------------------------------------------------- /code/dqc/attrcheck.q: -------------------------------------------------------------------------------- 1 | \d .dqc 2 | 3 | /- compares the attribute of given table to expectation given in csv 4 | attrcheck:{[tab;attribute;col] 5 | .lg.o[`dqe;"checking attributes on table ",string tab]; 6 | dictmeta:exec c!a from meta tab where c in col; 7 | dictcheck:(f col)!(f:{$[0>type x;enlist x;x]})attribute; 8 | $[dictmeta~dictcheck; 9 | (1b;"attribute of ",(","sv string(),col)," matched expectation"); 10 | (0b;"Expected attribute of column ",(","sv string(),col)," was ",(","sv string(),attribute),". Attribute of column ",(","sv string(),col)," is ",(","sv string(),value dictmeta))] 11 | } 12 | -------------------------------------------------------------------------------- /code/dqc/chkslowsub.q: -------------------------------------------------------------------------------- 1 | \d .dqc 2 | 3 | /- Function to check for slow subscribers 4 | chkslowsub:{[threshold] 5 | .lg.o[`dqe;"Checking for slow subscribers"]; 6 | overlimit:(key .z.W) where thresholdthres; 8 | (0b;"Following columns above threshold: ",(", " sv string b),"."); 9 | (1b;"No columns above threshold.") 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /code/dqc/memoryusage.q: -------------------------------------------------------------------------------- 1 | \d .dqc 2 | 3 | / - Check percentage of memory usage compared to max memory 4 | memoryusage:{[perc] 5 | .lg.o[`dqc;"checking whether the percetnage of memory usage exceeds ",(string 100*perc),"%"]; 6 | used:.Q.w[]`used; 7 | maxm:.Q.w[]`mphy; 8 | if[perc>=1; :(0b;"error: percentage is greater than or equal to 1")]; 9 | (c;"memory usage of the process ",$[c:usedthres; 10 | (0b;"Following columns above threshold: ",(", " sv string b),"."); 11 | (1b;"No columns above threshold.") 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /code/dqc/refdatacheck.q: -------------------------------------------------------------------------------- 1 | \d .dqc 2 | 3 | /- Check whether the referenced column of a table is in another column of 4 | /- another table. Takes four symbols as input, the table names and the columns 5 | /- to check. 6 | refdatacheck:{[tablea;tableb;cola;colb] 7 | .lg.o[`refdatacheck;"checking whether reference data is covered in the other column"]; 8 | msg:$[c:all r:tablea[cola]in tableb colb; 9 | "All data from ",(string cola)," of ",(string tablea),"exists in ",(string colb)," of ",string tableb; 10 | "The following data did not exist in ",(string colb)," of ",(string tableb),": ","," sv string tablea[cola]where not r]; 11 | .lg.o[`refdatacheck;"refdatacheck completed; All data from ",(string cola),$[c;"did";"did not"]," exist in ",string colb]; 12 | (c;msg) 13 | } 14 | -------------------------------------------------------------------------------- /code/dqc/schemacheck.q: -------------------------------------------------------------------------------- 1 | \d .dqc 2 | 3 | /- checks that the meta of a table matches expectation 4 | schemacheck:{[tab;colname;types;forkeys;attribute] 5 | .lg.o[`dqc;"checking schema of table mathces expectation"]; 6 | origschema:0!meta tab; 7 | checkschema:([]c:colname;t:types;f:forkeys;a:attribute); 8 | $[all c:checkschema~'origschema; 9 | (1b;"Schema of ",(string tab)," matched proposed schema"); 10 | (0b;"The following columns from the schema of table ",(string tab)," did not match expectation: ",(", "sv string origschema[`c][where not c]),". Expected schema from the columns: ",(.Q.s1`type`fkey`attr!checkschema[where not c][`t`f`a]),". Actual Schema: ",.Q.s1`type`fkey`attr!origschema[where not c][`t`f`a])] 11 | } 12 | -------------------------------------------------------------------------------- /code/dqc/symfilecheck.q: -------------------------------------------------------------------------------- 1 | \d .dqc 2 | hdbdir:@[value;`hdbdir;`hdb] 3 | 4 | /- check that the sym file exists 5 | symfilecheck:{[directory;filename] 6 | .lg.o[`dqc;"checking ",(1_string[filename])," exists in ",(1_string[directory])]; 7 | (c;"sym file named ",(string filename)," ",$[c:.os.Fex .Q.dd[directory]filename;"exists";"doesn't exist"]) 8 | } 9 | -------------------------------------------------------------------------------- /code/dqc/tablecomp.q: -------------------------------------------------------------------------------- 1 | /- only meant to be used for comparison 2 | \d .dqc 3 | tablecomp:{[tab] 4 | (1b;("table count of ",(string tab)," is ",c);c:count get tab) 5 | } 6 | -------------------------------------------------------------------------------- /code/dqc/tablecount.q: -------------------------------------------------------------------------------- 1 | \d .dqc 2 | 3 | /- compare the count of a table to a chosen value 4 | tablecount:{[tab;operator;chkvalue] 5 | .lg.o["checking count of ",string[tab]," is ",string[operator]," ",string[chkvalue]]; 6 | d:(>;=;<)!("greater than";"equal to";"less than"); 7 | statement:d[operator]," ",(string chkvalue),". Its count is ",string count value tab; 8 | c:operator .(count value tab;chkvalue); 9 | (c;"The count of ",(string tab)," is ",$[c;"";"not "],statement) 10 | } 11 | 12 | 13 | /- check if the count of the table is greater than zero 14 | tablehasrecords:.dqc.tablecount[;>;0]; 15 | 16 | /- count the number of rows in a table 17 | tablecountcomp:{[tab] 18 | count value tab 19 | } 20 | -------------------------------------------------------------------------------- /code/dqc/tableticking.q: -------------------------------------------------------------------------------- 1 | \d .dqc 2 | 3 | /- check that a table has obtained records within a specified period of time 4 | tableticking:{[tab;timeperiod;timetype] 5 | .lg.o[`dqc;"checking table recieved data in the last ",string[timeperiod]," ",string[timetype],"s"]; 6 | $[0re:(sum a)%count a:tl<(tn ca)-tn cb; 8 | (1b;"No major problem with data flow"); 9 | (0b;"ERROR: ",(string re*100),"% of differences between columns ",(string ca),", ",m:(string cb)," are greater than the timespan ",(string tl),".") 10 | ]; 11 | .lg.o[`timediff;ot 1]; 12 | ot 13 | } 14 | -------------------------------------------------------------------------------- /code/dqc/xmarketalert.q: -------------------------------------------------------------------------------- 1 | \d .dqc 2 | 3 | /- alerts user when bid has exceeded the ask in market data 4 | xmarketalert:{[tab] 5 | .lg.o[`dqc;"checking whether bid has exceeded ask price in market data"]; 6 | data:select from tab where bid>ask; 7 | $[0=count data; 8 | (1b;"bid has not exceeded the ask in market data"); 9 | (0b;"bid has exceeded the ask ",string[count data]," times and they have occured at: ","," sv string exec time from data)] 10 | } 11 | -------------------------------------------------------------------------------- /code/dqcommon/connection.q: -------------------------------------------------------------------------------- 1 | \d .dqe 2 | gethandles:{exec procname,proctype,w from .servers.SERVERS where (procname in x) | (proctype in x)} 3 | 4 | /- fill procname for results table 5 | fillprocname:{[rs;h] 6 | val:rs where not rs in raze a:h`proctype`procname; 7 | (flip a),val,'` 8 | } 9 | -------------------------------------------------------------------------------- /code/dqcommon/loadcsv.q: -------------------------------------------------------------------------------- 1 | \d .dqe 2 | readdqeconfig:{[file;types] 3 | /- notify user about reading in config csv 4 | .lg.o["reading dqengine config from ",string file:hsym file]; 5 | /- read in csv, trap error 6 | c:.[0:;((types;enlist",");file);{.lg.e["failed to load dqe configuration file: ",x]}] 7 | } 8 | 9 | -------------------------------------------------------------------------------- /code/dqe/backfill.q: -------------------------------------------------------------------------------- 1 | \d .dqe 2 | / - function to backfill dqedb data with older data from hdb 3 | backfill:{[dqetab;funct;vars;proc;dateof;dir] 4 | / - empty the table from memory first 5 | .dqe.cleartables[`.dqe;dqetab]; 6 | / - funct represents the dqe query that you would like to perform on the older data from an old date(dateof) 7 | .dqe.runquery[funct;(vars;dateof);`table;proc]; 8 | .dqe.savedata[dir;dateof;.dqe.tosavedown[.Q.dd[`.dqe;dqetab]];`.dqe;dqetab]; 9 | .dqe.cleartables[`.dqe;dqetab]; 10 | } 11 | -------------------------------------------------------------------------------- /code/dqe/bycount.q: -------------------------------------------------------------------------------- 1 | \d .dqe 2 | 3 | bycount:{[tab;bycols] 4 | .lg.o[`bycount;"Counting amount of messages received with by clauses applied to column(s) bycols"]; 5 | (enlist$[-11h=type bycols;;` sv]bycols)!enlist?[tab;enlist(=;.Q.pf;last .Q.PV);{x!x}(),bycols;(enlist`bycount)!enlist(count;`i)] 6 | } 7 | -------------------------------------------------------------------------------- /code/dqe/datecheck.q: -------------------------------------------------------------------------------- 1 | \d .dqe 2 | 3 | datecheck:{[tab] 4 | (enlist tab)!enlist "j"$last .Q.PV 5 | } 6 | -------------------------------------------------------------------------------- /code/dqe/groupcount.q: -------------------------------------------------------------------------------- 1 | \d .dqe 2 | 3 | groupcount:{[tab;cola;vara] 4 | .lg.o[`groupcount;"Counting amount of messages received with where clauses applied to columns column with variable vara"]; 5 | (enlist vara)!enlist ?[tab;((=;.Q.pf;last .Q.PV);(=;cola;enlist vara));1b;()] 6 | } 7 | -------------------------------------------------------------------------------- /code/dqe/infinitycount.q: -------------------------------------------------------------------------------- 1 | \d .dqe 2 | 3 | /- Given a table name as a symbol (tab), a column name as a symbol (col), returns the number of infinities in col of tab. 4 | /- Works on partitioned tables in an hdb 5 | infinitycount:{[tab;col] 6 | .lg.o[`infinitycount;"Getting count of infinities in",$[col~`;" ";" column: ",(string col)," of "],string tab]; 7 | (enlist tab)!enlist "j"$sum value{sum x in(0w;-0w;0W;-0W)}each flip?[tab;enlist(=;.Q.pf;last .Q.PV);1b;$[col~`;();{x!x}enlist col]] 8 | } 9 | -------------------------------------------------------------------------------- /code/dqe/nullcount.q: -------------------------------------------------------------------------------- 1 | \d .dqe 2 | 3 | /- Given a table name as a symbol (tab) and a column name as a symbol (col), returns the number of nulls in col of tab. 4 | /- Works on partitioned tables in an hdb 5 | /- col can be set to ` for the function to work on the whole table 6 | nullcount:{[tab;col] 7 | .lg.o[`nullcount;"Getting count of nulls in",$[col~`;" ";" column: ",(string col)," of "],string tab]; 8 | (enlist tab)!enlist "j"$sum value{sum$[0h=type x;0=count each x;null x]}each flip?[tab;enlist(=;.Q.pf;last .Q.PV);1b;$[col~`;();{x!x}enlist col]] 9 | } 10 | -------------------------------------------------------------------------------- /code/dqe/symcount.q: -------------------------------------------------------------------------------- 1 | \d .dqe 2 | /- distinct symbols count in a table tab and a column col. Works on partitioned 3 | /- tables in an hdb 4 | symcount:{[tab;col] 5 | .lg.o[`symcount;"Counting distinct symbols each day in column ",(string col)," of table ",string tab]; 6 | (enlist tab)!enlist count ?[tab; enlist(=;.Q.pf;last .Q.PV); 1b; {x!x}enlist col] 7 | } 8 | -------------------------------------------------------------------------------- /code/dqe/symfilecheck.q: -------------------------------------------------------------------------------- 1 | \d .dqe 2 | /- should be run on hdb process - function returns a dictionary of count of syms 3 | /- in sym file 4 | symfilecheck:{[filename] 5 | .lg.o[`symfilecheck;"Counting number of symbols in the symbol file each day"]; 6 | (enlist `symfilecount)!enlist count get filename 7 | } 8 | -------------------------------------------------------------------------------- /code/dqe/tablecount.q: -------------------------------------------------------------------------------- 1 | \d .dqe 2 | tablecount:{[par] 3 | .lg.o[`tablecount;"Getting table count dictionary"]; 4 | /- create dictionary of partition tables with their counts 5 | .Q.pt!{[par;x]count ?[x;enlist(=;.Q.pf;par);0b;()]}[par]'[.Q.pt] 6 | } 7 | -------------------------------------------------------------------------------- /code/handlers/order.txt: -------------------------------------------------------------------------------- 1 | dotz.q 2 | ldap.q 3 | writeaccess.q 4 | controlaccess.q 5 | permissions.q 6 | trackclients.q 7 | logusage.q 8 | apidetails.q 9 | zpsignore.q 10 | finspaceservers.q 11 | trackservers.q -------------------------------------------------------------------------------- /code/handlers/zpsignore.q: -------------------------------------------------------------------------------- 1 | // This is used to allow .z.ps (async) calls to not be permission checked, logged etc. 2 | // this can be useful as depending on how the connection is initiated, the username is not always available to check against 3 | // It should be loaded last as it globally overrides .z.ps 4 | 5 | \d .zpsignore 6 | 7 | enabled:@[value;`enabled;1b] // whether its enabled 8 | ignorelist:@[value;`ignorelist;(`upd;"upd";`.u.upd;".u.upd")] // list of functions to ignore 9 | 10 | if[enabled; 11 | .dotz.set[`.z.ps;{$[any first[y]~/:ignorelist;value y;x @ y]}[@[value;.dotz.getcommand[`.z.ps];{value}]]]] 12 | -------------------------------------------------------------------------------- /code/hdb/hdbstandard.q: -------------------------------------------------------------------------------- 1 | // reload function 2 | reload:{ 3 | .lg.o[`reload;"reloading HDB"]; 4 | system"l ."} 5 | 6 | // Get the relevant HDB attributes 7 | .proc.getattributes:{`partition`tables!(@[value;.Q.pf;.Q.PV];tables[])} 8 | 9 | -------------------------------------------------------------------------------- /code/monitor/datadogchecks.q: -------------------------------------------------------------------------------- 1 | \d .dg 2 | 3 | //send result of check from monitor process to datadog agent 4 | sendresultmetric:{[p;r] sendmetric["torqup.",(string `..checkconfig[r`checkid]`process);r`result];`..truefalse[p;r]} 5 | -------------------------------------------------------------------------------- /code/processes/compression.q: -------------------------------------------------------------------------------- 1 | \d .cmp 2 | 3 | inputcsv:@[value;`inputcsv;.proc.getconfigfile["compressionconfig.csv"]]; // compression config file to use 4 | hdbpath:@[value;`hdbpath;`:hdb] // hdb directory to compress 5 | maxage:@[value;`maxage;365] // the maximum date range of partitions to scan 6 | exitonfinish:@[value;`exitonfinish;1b] // exit the process when compression is complete 7 | 8 | if[not count key hsym .cmp.hdbpath; .lg.e[`compression; err:"invalid hdb path ",(string .cmp.hdbpath)];'err]; 9 | 10 | /- run the compression 11 | .cmp.compressmaxage[hsym .cmp.hdbpath;.cmp.inputcsv;.cmp.maxage] 12 | 13 | if[exitonfinish; .lg.o[`compression; "finished compression"]; exit 0] 14 | -------------------------------------------------------------------------------- /code/rdb/apidetails.q: -------------------------------------------------------------------------------- 1 | // Add to the api functions 2 | 3 | \d .api 4 | 5 | if[not`add in key `.api;add:{[name;public;descrip;params;return]}] 6 | 7 | add[`.rdb.moveandclear;1b;"Move a variable (table) from one namespace to another, deleting its contents. Useful during the end-of-day roll down for tables you do not want to save to the HDB";"[symbol: the namespace to move the table from; symbol:the namespace to move the variable to; symbol: the name of the variable]";"null"] 8 | -------------------------------------------------------------------------------- /code/rdb/endofperiod.q: -------------------------------------------------------------------------------- 1 | /-End of period function in the top level namespace 2 | endofperiod:{[currp;nextp;data] .lg.o[`endofperiod;"Received endofperiod. currentperiod, nextperiod and data are ",(string currp),", ", (string nextp),", ", .Q.s1 data]}; 3 | -------------------------------------------------------------------------------- /code/rdb/rdbstandard.q: -------------------------------------------------------------------------------- 1 | // Get the relevant RDB attributes 2 | .proc.getattributes:{`partition`tables!(.rdb.getpartition[],();tables[])} 3 | 4 | \d .rdb 5 | 6 | /- Move a table from one namespace to another 7 | /- this could be used in the end-of-day function to move the heartbeat and logmsg 8 | /- tables out of the top level namespace before the save down, then move them 9 | /- back when done. 10 | moveandclear:{[fromNS;toNS;tab] 11 | if[tab in key fromNS; 12 | set[` sv (toNS;tab);0#fromNS tab]; 13 | eval(!;enlist fromNS;();0b;enlist enlist tab)]} 14 | 15 | upd:@[value;`upd;{insert}]; //value of upd 16 | 17 | \d . 18 | 19 | /-set the upd function in the top level namespace 20 | upd:.rdb.upd 21 | 22 | .u.end:{[d] .rdb.endofday[d;()!()]}; 23 | -------------------------------------------------------------------------------- /config/application.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/config/application.txt -------------------------------------------------------------------------------- /config/compressionconfig.csv: -------------------------------------------------------------------------------- 1 | table,minage,column,calgo,cblocksize,clevel 2 | default,10,default,1,16,0 3 | -------------------------------------------------------------------------------- /config/dataaccess/tableproperties.csv: -------------------------------------------------------------------------------- 1 | proctype,tablename,primarytimecolumn,attributecolumn,instrumentcolumn,rolltimeoffset,rolltimezone,datatimezone,partitionfield 2 | ,trade,time,sym,sym,,,, 3 | ,quote,time,sym,sym,,,, 4 | -------------------------------------------------------------------------------- /config/dependency.csv: -------------------------------------------------------------------------------- 1 | app,version,dependency 2 | TorQ,5.1.0, 3 | -------------------------------------------------------------------------------- /config/dqcconfig.csv: -------------------------------------------------------------------------------- 1 | action,params,proc,mode,starttime,endtime,period 2 | -------------------------------------------------------------------------------- /config/dqedetail.csv: -------------------------------------------------------------------------------- 1 | name,public,descrip,params,return 2 | -------------------------------------------------------------------------------- /config/dqengineconfig.csv: -------------------------------------------------------------------------------- 1 | query,params,proc,querytype,starttime 2 | -------------------------------------------------------------------------------- /config/filealerter.csv: -------------------------------------------------------------------------------- 1 | path,match,function,newonly,movetodirectory -------------------------------------------------------------------------------- /config/housekeeping.csv: -------------------------------------------------------------------------------- 1 | function,path,match,exclude,age 2 | rm,{KDBLOG}/,*.log,,10 -------------------------------------------------------------------------------- /config/monitorconfig.csv: -------------------------------------------------------------------------------- 1 | family|metric|process|query|resultchecker|params|period|runtime 2 | -------------------------------------------------------------------------------- /config/nontorqprocess.csv: -------------------------------------------------------------------------------- 1 | host,port,proctype,procname 2 | -------------------------------------------------------------------------------- /config/passwords/chainedtp.txt: -------------------------------------------------------------------------------- 1 | chainedtp:pass -------------------------------------------------------------------------------- /config/passwords/default.txt: -------------------------------------------------------------------------------- 1 | torquser:pass 2 | -------------------------------------------------------------------------------- /config/passwords/discovery.txt: -------------------------------------------------------------------------------- 1 | discovery:pass 2 | -------------------------------------------------------------------------------- /config/passwords/dqc.txt: -------------------------------------------------------------------------------- 1 | dqc:pass 2 | -------------------------------------------------------------------------------- /config/passwords/dqcdb.txt: -------------------------------------------------------------------------------- 1 | dqcdb:pass 2 | -------------------------------------------------------------------------------- /config/passwords/dqe.txt: -------------------------------------------------------------------------------- 1 | dqe:pass 2 | -------------------------------------------------------------------------------- /config/passwords/dqedb.txt: -------------------------------------------------------------------------------- 1 | dqedb:pass 2 | -------------------------------------------------------------------------------- /config/passwords/filealerter.txt: -------------------------------------------------------------------------------- 1 | filealerter:pass 2 | -------------------------------------------------------------------------------- /config/passwords/gateway.txt: -------------------------------------------------------------------------------- 1 | gateway:pass 2 | -------------------------------------------------------------------------------- /config/passwords/hdb.txt: -------------------------------------------------------------------------------- 1 | hdb:pass 2 | -------------------------------------------------------------------------------- /config/passwords/housekeeping.txt: -------------------------------------------------------------------------------- 1 | housekeeping:pass 2 | -------------------------------------------------------------------------------- /config/passwords/idb.txt: -------------------------------------------------------------------------------- 1 | idb:pass 2 | -------------------------------------------------------------------------------- /config/passwords/kill.txt: -------------------------------------------------------------------------------- 1 | kill:pass 2 | -------------------------------------------------------------------------------- /config/passwords/monitor.txt: -------------------------------------------------------------------------------- 1 | monitor:pass 2 | -------------------------------------------------------------------------------- /config/passwords/rdb.txt: -------------------------------------------------------------------------------- 1 | rdb:pass 2 | -------------------------------------------------------------------------------- /config/passwords/reporter.txt: -------------------------------------------------------------------------------- 1 | reporter:pass 2 | -------------------------------------------------------------------------------- /config/passwords/segmentedtickerplant.txt: -------------------------------------------------------------------------------- 1 | segmentedtickerplant:pass 2 | -------------------------------------------------------------------------------- /config/passwords/sort.txt: -------------------------------------------------------------------------------- 1 | sort:pass 2 | -------------------------------------------------------------------------------- /config/passwords/sortworker.txt: -------------------------------------------------------------------------------- 1 | sortworker:pass 2 | -------------------------------------------------------------------------------- /config/passwords/tickerplant.txt: -------------------------------------------------------------------------------- 1 | tickerplant:pass 2 | -------------------------------------------------------------------------------- /config/passwords/wdb.txt: -------------------------------------------------------------------------------- 1 | wdb:pass 2 | -------------------------------------------------------------------------------- /config/permissions/default_functions.csv: -------------------------------------------------------------------------------- 1 | func,default,power,userlist 2 | +,1,1, 3 | *,1,1, 4 | %,1,1, 5 | -,1,1, 6 | ?,0,1, 7 | =,0,1, 8 | <,0,1, 9 | >,0,1, 10 | in,0,1, 11 | within,0,1, 12 | ~:,0,1, 13 | max,0,1, 14 | min,0,1, 15 | *:,0,1, 16 | last,0,1, 17 | ',0,1, 18 | #:,0,1, 19 | avg,0,1, 20 | wavg,0,1, 21 | ",",0,1, 22 | enlist,0,1, 23 | exit,0,0, 24 | `reload,0,1, 25 | `..register,0,1, 26 | `getservices,0,1, 27 | `.servers.getdetails,0,1, 28 | `.servers.autodiscovery,0,1, 29 | `.servers.procupdate,1,1, 30 | `.gw.addservererror,1,1, 31 | `.gw.addserverresult,1,1, 32 | `.u.end,1,1, 33 | `getservices,0,1, 34 | `upd,1,1, 35 | `myfunc,0,1,bob;jeff 36 | -------------------------------------------------------------------------------- /config/permissions/default_hosts.csv: -------------------------------------------------------------------------------- 1 | host,allowed 2 | *,1 3 | -------------------------------------------------------------------------------- /config/permissions/default_users.csv: -------------------------------------------------------------------------------- 1 | user,defaultuser,poweruser,superuser 2 | ,1,0,0 3 | qcon,1,0,0 4 | testpower,1,1,0 5 | testsuper,0,0,1 6 | testdefault,1,0,0 7 | gateway,1,1,1 8 | kill,1,1,1 9 | rdb,1,1,1 10 | hdb,1,1,0 11 | discovery,1,1,0 12 | monitor,1,1,0 13 | idb,1,1,0 14 | -------------------------------------------------------------------------------- /config/permissions/gateway_functions.csv: -------------------------------------------------------------------------------- 1 | func,default,power,userlist 2 | `.gw.asyncexec,1,1, 3 | `.gw.asyncexecjpt,1,1, 4 | `.gw.syncexec,1,1, 5 | `.gw.syncexecj,1,1, 6 | -------------------------------------------------------------------------------- /config/process.csv: -------------------------------------------------------------------------------- 1 | host,port,proctype,procname,U,localtime,g,T,w,load,startwithall,extras,qcmd 2 | -------------------------------------------------------------------------------- /config/reporter.csv: -------------------------------------------------------------------------------- 1 | name|query|resulthandler|gateway|joinfunction|proctype|procname|start|end|period|timeoutinterval|daysofweek 2 | -------------------------------------------------------------------------------- /config/settings/compression.q: -------------------------------------------------------------------------------- 1 | /- Default configuration file for the compression process 2 | 3 | /- switch off some of the standard things 4 | .usage.enabled:0b 5 | .clients.enabled:0b 6 | .servers.enabled:0b; 7 | .hb.enabled:0b; 8 | 9 | \d .cmp 10 | inputcsv:first .proc.getconfigfile["compressionconfig.csv"] // compression config file to use 11 | hdbpath:`:hdb // hdb directory 12 | maxage:30 // the maximum date range of partitions to scan 13 | exitonfinish:1b // exit the process when compression is complete 14 | -------------------------------------------------------------------------------- /config/settings/dqc.q: -------------------------------------------------------------------------------- 1 | //data quality engine config 2 | 3 | \d .dqe 4 | 5 | configcsv:first .proc.getconfigfile["dqcconfig.csv"] 6 | dqcdbdir:hsym`$getenv[`KDBDQCDB] // location to save dqc data 7 | hdbdir:hsym`$getenv[`KDBHDB] // for locating the sym file 8 | utctime:1b // define whether this process is on UTC time or not 9 | partitiontype:`date // default partition type to date 10 | writedownperiod:0D00:05:00 // period for writedown 11 | getpartition:{@[value;`.dqe.currentpartition;(`date^partitiontype)$(.z.D,.z.d)utctime]} 12 | 13 | \d .proc 14 | loadprocesscode:1b // whether to load the process specific code defined at ${KDBCODE}/{process type} 15 | -------------------------------------------------------------------------------- /config/settings/dqe.q: -------------------------------------------------------------------------------- 1 | \d .dqe 2 | dqedbdir:hsym`$getenv[`KDBDQEDB] // location to save dqc data 3 | hdbdir:hsym`$getenv[`KDBHDB] // for locating the sym file 4 | utctime:1b // define whether this process is on UTC time or not 5 | partitiontype:`date // default partition type to date 6 | getpartition:{@[value;`.dqe.currentpartition;(`date^partitiontype)$(.z.D,.z.d)utctime]} 7 | writedownperiodengine:0D00:05:00 // period for writedown 8 | hdbtypes:enlist`hdb; // hdb types for use in saving 9 | 10 | \d .proc 11 | loadprocesscode:1b // whether to load the process specific code defined at ${KDBCODE}/{process type} 12 | -------------------------------------------------------------------------------- /config/settings/hdb.q: -------------------------------------------------------------------------------- 1 | // Bespoke HDB config 2 | 3 | \d .proc 4 | loadprocesscode:1b // whether to load the process specific code defined at ${KDBCODE}/{process type} 5 | 6 | // Server connection details 7 | \d .servers 8 | CONNECTIONS:() // list of connections to make at start up 9 | STARTUP:1b // create connections 10 | 11 | -------------------------------------------------------------------------------- /config/settings/housekeeping.q: -------------------------------------------------------------------------------- 1 | //housekeeping config 2 | \d .hk 3 | 4 | inputcsv:first .proc.getconfigfile["housekeeping.csv"] 5 | runtimes:02:00:00 6 | runnow:0b 7 | 8 | \d .win 9 | 10 | version:`w10 11 | -------------------------------------------------------------------------------- /config/settings/idb.q: -------------------------------------------------------------------------------- 1 | // Bespoke IDB config 2 | \d .idb 3 | wdbtypes:`wdb; 4 | 5 | // Server connection details 6 | \d .servers 7 | CONNECTIONS:`wdb // list of connections to make at start up 8 | STARTUP:1b // create connections 9 | 10 | \d .proc 11 | loadprocesscode:0b // whether to load the process specific code defined at ${KDBCODE}/{process type} 12 | -------------------------------------------------------------------------------- /config/settings/reporter.q: -------------------------------------------------------------------------------- 1 | /- Reporter config 2 | 3 | \d .rp 4 | 5 | inputcsv:first .proc.getconfigfile["reporter.csv"]; /- Location of report configuration csv file 6 | flushqueryloginterval:1D00:00:00; /- How often to flush the report query log data 7 | writetostdout:1b; /- whether to write query log info to standard out as well 8 | 9 | \d .servers 10 | CONNECTIONS:`gateway`rdb`hdb /- create connections to all processes 11 | -------------------------------------------------------------------------------- /config/sort.csv: -------------------------------------------------------------------------------- 1 | tabname,att,column,sort 2 | default,p,sym,1 3 | default,,time,1 4 | -------------------------------------------------------------------------------- /config/tzinfo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/config/tzinfo -------------------------------------------------------------------------------- /datadog/monitors/monitors.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/datadog/monitors/monitors.zip -------------------------------------------------------------------------------- /docs/graphics/DataIntellect-TorQ-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/docs/graphics/DataIntellect-TorQ-logo.png -------------------------------------------------------------------------------- /docs/graphics/DataIntellect-header-logo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/docs/graphics/DataIntellect-header-logo.jpg -------------------------------------------------------------------------------- /docs/graphics/Installscript_folder_structure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/docs/graphics/Installscript_folder_structure.png -------------------------------------------------------------------------------- /docs/graphics/TorQ-Structure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/docs/graphics/TorQ-Structure.png -------------------------------------------------------------------------------- /docs/graphics/async.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/docs/graphics/async.png -------------------------------------------------------------------------------- /docs/graphics/create2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/docs/graphics/create2.png -------------------------------------------------------------------------------- /docs/graphics/datadog1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/docs/graphics/datadog1.png -------------------------------------------------------------------------------- /docs/graphics/datadog2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/docs/graphics/datadog2.png -------------------------------------------------------------------------------- /docs/graphics/discovery1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/docs/graphics/discovery1.png -------------------------------------------------------------------------------- /docs/graphics/discovery2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/docs/graphics/discovery2.png -------------------------------------------------------------------------------- /docs/graphics/discovery3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/docs/graphics/discovery3.png -------------------------------------------------------------------------------- /docs/graphics/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/docs/graphics/favicon.ico -------------------------------------------------------------------------------- /docs/graphics/fullarchitecture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/docs/graphics/fullarchitecture.png -------------------------------------------------------------------------------- /docs/graphics/fullarchitecture2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/docs/graphics/fullarchitecture2.png -------------------------------------------------------------------------------- /docs/graphics/grafana_chart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/docs/graphics/grafana_chart.png -------------------------------------------------------------------------------- /docs/graphics/idb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/docs/graphics/idb.png -------------------------------------------------------------------------------- /docs/graphics/monitor_ui_running.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/docs/graphics/monitor_ui_running.png -------------------------------------------------------------------------------- /docs/graphics/parent3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/docs/graphics/parent3.png -------------------------------------------------------------------------------- /docs/graphics/reporter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/docs/graphics/reporter.png -------------------------------------------------------------------------------- /docs/graphics/simpletickdiagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/docs/graphics/simpletickdiagram.png -------------------------------------------------------------------------------- /html/img/DataIntellect-TorQ-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/html/img/DataIntellect-TorQ-logo.png -------------------------------------------------------------------------------- /html/img/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/html/img/favicon.ico -------------------------------------------------------------------------------- /html/img/sort_asc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/html/img/sort_asc.png -------------------------------------------------------------------------------- /html/img/sort_asc_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/html/img/sort_asc_disabled.png -------------------------------------------------------------------------------- /html/img/sort_both.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/html/img/sort_both.png -------------------------------------------------------------------------------- /html/img/sort_desc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/html/img/sort_desc.png -------------------------------------------------------------------------------- /html/img/sort_desc_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/html/img/sort_desc_disabled.png -------------------------------------------------------------------------------- /lib/l32/libcrypto.so.1.0.0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/lib/l32/libcrypto.so.1.0.0 -------------------------------------------------------------------------------- /lib/l32/libcurl.so.4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/lib/l32/libcurl.so.4 -------------------------------------------------------------------------------- /lib/l32/libssl.so.1.0.0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/lib/l32/libssl.so.1.0.0 -------------------------------------------------------------------------------- /lib/l32/torQemail.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/lib/l32/torQemail.so -------------------------------------------------------------------------------- /lib/l64/kafkaq.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/lib/l64/kafkaq.so -------------------------------------------------------------------------------- /lib/l64/kdbldap.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/lib/l64/kdbldap.so -------------------------------------------------------------------------------- /lib/l64/libcrypto.so.1.0.0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/lib/l64/libcrypto.so.1.0.0 -------------------------------------------------------------------------------- /lib/l64/libcurl.so.4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/lib/l64/libcurl.so.4 -------------------------------------------------------------------------------- /lib/l64/libssl.so.1.0.0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/lib/l64/libssl.so.1.0.0 -------------------------------------------------------------------------------- /lib/l64/torQemail.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/lib/l64/torQemail.so -------------------------------------------------------------------------------- /lib/m32/libcurl.4.dylib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/lib/m32/libcurl.4.dylib -------------------------------------------------------------------------------- /lib/m32/torQemail.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/lib/m32/torQemail.so -------------------------------------------------------------------------------- /lib/m64/libcurl.4.dylib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/lib/m64/libcurl.4.dylib -------------------------------------------------------------------------------- /lib/m64/torQemail.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/lib/m64/torQemail.so -------------------------------------------------------------------------------- /lib/w32/libcurl.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/lib/w32/libcurl.dll -------------------------------------------------------------------------------- /lib/w32/libeay32.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/lib/w32/libeay32.dll -------------------------------------------------------------------------------- /lib/w32/libssh2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/lib/w32/libssh2.dll -------------------------------------------------------------------------------- /lib/w32/ssleay32.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/lib/w32/ssleay32.dll -------------------------------------------------------------------------------- /lib/w32/torQemail.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/lib/w32/torQemail.dll -------------------------------------------------------------------------------- /logs/dummy.log: -------------------------------------------------------------------------------- 1 | dummy log file 2 | -------------------------------------------------------------------------------- /monit/templates/monitalert.cfg: -------------------------------------------------------------------------------- 1 | check system examplehost 2 | if loadavg (5min) > 3 for 4 cycles then alert 3 | if loadavg (15min) > 1 for 4 cycles then alert 4 | if memory usage > 80% for 4 cycles then alert 5 | if swap usage > 20% for 4 cycles then alert 6 | if cpu usage (system) > 20% for 4 cycles then alert 7 | 8 | check host examplehost.com with address gwadawdawdwad.com 9 | if failed url http://gawdawdawdaw.com 10 | then alert 11 | 12 | 13 | -------------------------------------------------------------------------------- /monit/templates/monittemplate.txt: -------------------------------------------------------------------------------- 1 | check process $procname 2 | matching \"$KDBBASEPORT -proctype $proctype -procname $procname\" 3 | start program = \"/bin/bash -c '$startstopsc start $procname'\" 4 | with timeout 10 seconds 5 | stop program = \"/bin/bash -c '$startstopsc stop $procname'\" 6 | every \"* * * * *\" 7 | mode active 8 | -------------------------------------------------------------------------------- /tests/bglaunchprocess/process.csv: -------------------------------------------------------------------------------- 1 | host,port,proctype,procname,U,localtime,g,T,w,load,startwithall,extras,qcmd 2 | localhost,{KDBBASEPORT}+1,discovery,discovery1,,1,0,,,${KDBCODE}/processes/discovery.q,1,,q 3 | -------------------------------------------------------------------------------- /tests/bglaunchprocess/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | #path to test directory 4 | testpath=${KDBTESTS}/bglaunchprocess/ 5 | 6 | #start procs 7 | ${TORQHOME}/torq.sh start all -csv ${testpath}/process.csv 8 | 9 | #Start test proc 10 | /usr/bin/rlwrap q ${TORQHOME}/torq.q \ 11 | -proctype test -procname test1 \ 12 | -test ${testpath} \ 13 | -load ${TORQHOME}/code/common/bglaunchutils.q ${testpath}/settings.q \ 14 | -procfile ${testpath}/process.csv -debug 15 | 16 | #Shut down procs 17 | ${TORQHOME}/torq.sh stop all -csv ${testpath}/process.csv 18 | -------------------------------------------------------------------------------- /tests/bglaunchprocess/settings.q: -------------------------------------------------------------------------------- 1 | /variables and fns to be used during the unit tests: 2 | /let the test port_no be 7124 3 | 4 | input1:`procname`proctype`U`localtime`p`T`g`w`qcmd`custom`load!("test2";"test";"${KDBAPPCONFIG}/passwords/accesslist.txt";"0";"7124";"180";"1";"1000";"q";"custom_arg";"${TORQHOME}/tests/bglaunchprocess/settings.q"); 5 | input2:`procname`proctype`load!("test3";"test";"${TORQHOME}/tests/bglaunchprocess/settings.q"); 6 | .servers.startup[]; 7 | 8 | -------------------------------------------------------------------------------- /tests/chainedtp/database.q: -------------------------------------------------------------------------------- 1 | trade:flip `time`sym`price`size`stop`cond`ex`side!"PSFIBCCS" $\: (); 2 | quote:flip `time`sym`bid`ask`bsize`asize`mode`ex`src!"PSFFJJCCS" $\: (); 3 | -------------------------------------------------------------------------------- /tests/chainedtp/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Handle command-line arguments 4 | source $KDBTESTS/flagparse.sh 5 | 6 | # Path to test directory 7 | testpath=${KDBTESTS}/chainedtp 8 | 9 | # Start procs 10 | ${TORQHOME}/torq.sh start discovery1 tp1 ctp1 rdb1 -csv ${testpath}/process.csv 11 | 12 | # Start test proc 13 | /usr/bin/rlwrap q ${TORQHOME}/torq.q \ 14 | -proctype test -procname test1 \ 15 | -test ${testpath} \ 16 | -load ${KDBTESTS}/helperfunctions.q ${testpath}/settings.q \ 17 | -testresults ${testpath}/results/ \ 18 | -runtime $run \ 19 | -procfile ${testpath}/process.csv \ 20 | $debug $stop $write $quiet 21 | 22 | # Stop procs 23 | ${TORQHOME}/torq.sh stop rdb1 ctp2 tp1 discovery1 -csv ${testpath}/process.csv 24 | -------------------------------------------------------------------------------- /tests/chainedtp/settings.q: -------------------------------------------------------------------------------- 1 | // IPC connection parameters 2 | .servers.CONNECTIONS:`tickerplant`chainedtp`rdb; 3 | .servers.USERPASS:`admin:admin; 4 | 5 | // Test updates 6 | testtrade:((5#`GOOG),5?`4;10?100.0;10?100i;10#0b;10?.Q.A;10?.Q.A;10#`buy); 7 | testquote:(10?`4;(5?50.0),50+5?50.0;10?100.0;10?100i;10?100i;10?.Q.A;10?.Q.A;10#`3); 8 | 9 | // Paths to process CSV and test TP log directory 10 | processcsv:getenv[`KDBTESTS],"/chainedtp/process.csv"; 11 | tptestlogs:getenv[`KDBTESTS],"/chainedtp/tplogs"; 12 | 13 | // Function projections (using functions from helperfunctions.q) 14 | startproc:startorstopproc["start";;processcsv]; 15 | stopproc:startorstopproc["stop";;processcsv]; 16 | -------------------------------------------------------------------------------- /tests/dataaccess/checkinputs/config/process.csv: -------------------------------------------------------------------------------- 1 | host,port,proctype,procname,U,localtime,g,T,w,load,startwithall,extras,qcmd 2 | localhost,{KDBBASEPORT}+1,discovery,discovery1,${TORQAPPHOME}/appconfig/passwords/accesslist.txt,1,0,,,${KDBCODE}/processes/discovery.q,1,,q 3 | localhost,{KDBBASEPORT}+2,rdb,dailyrdb1,${TORQAPPHOME}/appconfig/passwords/accesslist.txt,1,0,,,${TORQHOME}/tests/dataaccess/checkinputs/settings.q ${TORQHOME}/tests/dataaccess/mockdata.q,1,-dataaccess ${KDBTESTS}/dataaccess/checkinputs/config/tableproperties.csv,q 4 | -------------------------------------------------------------------------------- /tests/dataaccess/checkinputs/config/tableproperties.csv: -------------------------------------------------------------------------------- 1 | proctype,tablename,primarytimecolumn,attributecolumn,instrumentcolumn,rolltimeoffset,rolltimezone,datatimezone,partitionfield 2 | ,xdaily,time,sym,sym,,,, -------------------------------------------------------------------------------- /tests/dataaccess/checkinputs/settings.q: -------------------------------------------------------------------------------- 1 | testpath:hsym`$getenv[`KDBTESTS],"/dataaccess/checkinputs"; 2 | processcsv:` sv testpath,`config`process.csv; 3 | 4 | //- code to pass in a test name 5 | //- extract the input parameter from {testname}.csv 6 | //- extract the expected error from checkinputerrors.csv 7 | //- compare error with expected error 8 | checkreturnederror:{[test]errors[test;`error]~@[.dataaccess.checkinputs;gettestparams test;::]}; 9 | checkreturnederrorcustom:{[test;param]errors[test;`error]~@[.dataaccess.checkinputs;param;::]}; 10 | 11 | //- read dictionary of params from csv named according to the test {testname}.csv 12 | gettestparams:{[test]exec parameter!get each parametervalue from .checkinputs.readcsv[` sv testpath,`testdata,`$string[test],".csv";"s*"]}; 13 | -------------------------------------------------------------------------------- /tests/dataaccess/checkinputs/testdata/aggnumber.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | tablename,`xdaily 3 | starttime,2000.01.010D 4 | endtime,.z.p 5 | timecolumn,`time 6 | aggregations,(enlist(`wavg))!enlist(enlist(`askprice)) 7 | -------------------------------------------------------------------------------- /tests/dataaccess/checkinputs/testdata/aggregationcolumnsexist.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | tablename,`xdaily 3 | starttime,2000.01.010D 4 | endtime,.z.p 5 | timecolumn,`time 6 | aggregations,`min`max!`invalid1`invalid2 7 | -------------------------------------------------------------------------------- /tests/dataaccess/checkinputs/testdata/aggregationdistinct.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | tablename,`xdaily 3 | starttime,2000.01.010D 4 | endtime,.z.p 5 | timecolumn,`time 6 | aggregations,`distinct`distinct!`bidprice`askprice 7 | -------------------------------------------------------------------------------- /tests/dataaccess/checkinputs/testdata/aggtimebar.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | tablename,`xdaily 3 | starttime,2000.01.010D 4 | endtime,.z.p 5 | timecolumn,`time 6 | timebar,(6;`hour;`time) 7 | aggregations,(enlist(distinct))!enlist(enlist(`askprice)) 8 | -------------------------------------------------------------------------------- /tests/dataaccess/checkinputs/testdata/columncheckffby.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | tablename,`xdaily 3 | starttime,2000.01.01D 4 | endtime,2000.01.06D10:00 5 | freeformby,"""invalid"" 6 | -------------------------------------------------------------------------------- /tests/dataaccess/checkinputs/testdata/columncheckffcolumn.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | tablename,`xdaily 3 | starttime,2000.01.01D 4 | endtime,2000.01.06D10:00 5 | freeformcolumn,"""avgmid:avg 0.5*invalid+invalid2"" 6 | -------------------------------------------------------------------------------- /tests/dataaccess/checkinputs/testdata/columncheckffwhere.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | tablename,`xdaily 3 | starttime,2000.01.01D 4 | endtime,2000.01.06D10:00 5 | freeformwhere,"""invalid in `AUDUSD`EURUSD"" 6 | -------------------------------------------------------------------------------- /tests/dataaccess/checkinputs/testdata/columnsexist.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | tablename,`xdaily 3 | starttime,2000.01.010D 4 | endtime,.z.p 5 | timecolumn,`time 6 | columns,`invalid1`invalid2 7 | -------------------------------------------------------------------------------- /tests/dataaccess/checkinputs/testdata/dictfreeformby.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | tablename,`xdaily 3 | starttime,2000.01.010D 4 | endtime,.z.p 5 | timecolumn,`time 6 | freeformby,"""`invalid1`invalid2!(1 2)"" 7 | -------------------------------------------------------------------------------- /tests/dataaccess/checkinputs/testdata/invalidaggregationfuncs.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | tablename,`xdaily 3 | starttime,2000.01.010D 4 | endtime,.z.p 5 | timecolumn,`time 6 | aggregations,`invalid1`invalid2!(`bidprice`askprice;(`asksize`askprice;`bidsize`bidprice)) 7 | -------------------------------------------------------------------------------- /tests/dataaccess/checkinputs/testdata/invalidtimecolumn.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | tablename,`xdaily 3 | starttime,2000.01.010D 4 | endtime,.z.p 5 | timecolumn,`source 6 | -------------------------------------------------------------------------------- /tests/dataaccess/checkinputs/testdata/notffwhere.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | tablename,`xdaily 3 | starttime,2000.01.01D 4 | endtime,2000.01.06D10:00 5 | freeformwhere,"""not sym = `AUDUSD"" 6 | -------------------------------------------------------------------------------- /tests/dataaccess/checkinputs/testdata/operatorffwhere.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | tablename,`xdaily 3 | starttime,2000.01.01D 4 | endtime,2000.01.06D10:00 5 | freeformwhere,"""sym % `AUDUSD"" 6 | -------------------------------------------------------------------------------- /tests/dataaccess/checkinputs/testdata/smalltimebar.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | tablename,`xdaily 3 | starttime,2000.01.010D 4 | endtime,.z.p 5 | timecolumn,`time 6 | aggregations,(enlist(`max))!enlist(enlist(`askprice)) 7 | timebar,(0.5;`nanoseconds;`time) 8 | -------------------------------------------------------------------------------- /tests/dataaccess/checkinputs/testdata/tableexists.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | tablename,`invalidtablename 3 | starttime,2000.01.010D 4 | endtime,.z.p 5 | timecolumn,`time 6 | -------------------------------------------------------------------------------- /tests/dataaccess/checkinputs/testdata/timebarexists.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | tablename,`xdaily 3 | starttime,2000.01.010D 4 | endtime,.z.p 5 | timecolumn,`time 6 | timebar,(10;`nanosecond;`invalid) 7 | aggregations,`max`min!`time`time 8 | -------------------------------------------------------------------------------- /tests/dataaccess/checkinputs/testdata/timebarinvalid.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | tablename,`xdaily 3 | starttime,2000.01.010D 4 | endtime,.z.p 5 | timecolumn,`time 6 | timebar,"(10,`invalid,`time)" 7 | aggregations,`max`min!`time`time 8 | -------------------------------------------------------------------------------- /tests/dataaccess/checkinputs/testdata/timebarmissingagg.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | tablename,`xdaily 3 | starttime,2000.01.010D 4 | endtime,.z.p 5 | timecolumn,`time 6 | timebar,(6;`hour;`time) 7 | -------------------------------------------------------------------------------- /tests/dataaccess/checkinputs/testdata/timebartype.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | tablename,`xdaily 3 | starttime,2000.01.010D 4 | endtime,.z.p 5 | timecolumn,`time 6 | timebar,(6;`hour;`sym) 7 | aggregations,(`max`min)!(`askprice`askprice) 8 | -------------------------------------------------------------------------------- /tests/dataaccess/checkinputs/testdata/timecolumnexists.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | tablename,`xdaily 3 | starttime,2000.01.010D 4 | endtime,.z.p 5 | timecolumn,`month 6 | -------------------------------------------------------------------------------- /tests/dataaccess/checkinputs/testdata/validinput1.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | tablename,`xdaily 3 | starttime,2000.01.01D 4 | endtime,2000.01.06D10:00 5 | instruments,`AUDUSD 6 | columns,`bidprice`bidsize`askprice`asksize 7 | timebar,(1;`hour;`time) 8 | filters,`source`sourcetime!(enlist(like;"source?");enlist(<;0wp)) 9 | freeformwhere,"""bidprice<0w,bidsize<0w""" 10 | freeformby,"""sym:sym,source:source""" 11 | freeformcolumn,"""sym:sym,source:source""" 12 | -------------------------------------------------------------------------------- /tests/dataaccess/checkinputs/testdata/validinput2.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | tablename,`xdaily 3 | starttime,2000.01.01 4 | endtime,2000.01.06 5 | timecolumn,`time 6 | instruments,`AUDUSD`EURUSD 7 | grouping,`sym`source 8 | aggregations,`min`max`wavg!(`bidprice`askprice;`bidprice`askprice;(`bidsize`bidprice;`asksize`askprice)) 9 | filters,`source`sourcetime!(enlist(like;"source?");(enlist(>;0wp))) 10 | freeformwhere,"""bidprice<0w,bidsize<0w""" 11 | freeformby,"""src:source,s:sym""" 12 | -------------------------------------------------------------------------------- /tests/dataaccess/checkinputs/testdata/validinput3.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | tablename,`xdaily 3 | starttime,2000.01.01D 4 | endtime,2000.01.06D12:00 5 | timecolumn,`time 6 | instruments,`AUDUSD`EURUSD 7 | grouping,`sym`source 8 | aggregations,`min`max`wavg!(`bidprice`askprice;`bidprice`askprice;(`bidsize`bidprice;`asksize`askprice)) 9 | timebar,(6;`hour;`sourcetime) 10 | filters,`source`sourcetime!(enlist(like;"source?");enlist(<;0wp)) 11 | freeformwhere,"""bidprice<0w,bidsize<0w""" 12 | freeformby,"""src:source,s:sym""" 13 | -------------------------------------------------------------------------------- /tests/dataaccess/common/config/process.csv: -------------------------------------------------------------------------------- 1 | host,port,proctype,procname,U,localtime,g,T,w,load,startwithall,extras,qcmd 2 | localhost,{KDBBASEPORT}+1,discovery,discovery1,${TORQAPPHOME}/appconfig/passwords/accesslist.txt,1,0,,,${KDBCODE}/processes/discovery.q,1,,q 3 | localhost,{KDBBASEPORT}+2,rdb,dailyrdb1,${TORQAPPHOME}/appconfig/passwords/accesslist.txt,1,0,,,${TORQHOME}/tests/dataaccess/common/settings.q ${TORQHOME}/tests/dataaccess/common/mockdata.q,1,-dataaccess ${KDBTESTS}/dataaccess/common/config/tableproperties.csv,q 4 | -------------------------------------------------------------------------------- /tests/dataaccess/common/config/tableproperties.csv: -------------------------------------------------------------------------------- 1 | proctype,tablename,primarytimecolumn,attributecolumn,instrumentcolumn,rolltimeoffset,rolltimezone,datatimezone,partitionfield 2 | ,xdaily,time,sym,sym,,,, -------------------------------------------------------------------------------- /tests/dataaccess/common/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Handle command-line arguments 4 | source $KDBTESTS/flagparse.sh 5 | 6 | # Path to test directory 7 | testpath=${KDBTESTS}/dataaccess/common 8 | 9 | # Start procs 10 | ${TORQHOME}/torq.sh start discovery1 11 | 12 | # Start test proc 13 | /usr/bin/rlwrap q ${TORQHOME}/torq.q \ 14 | -proctype rdb -procname dailyrdb1 \ 15 | -test ${testpath} \ 16 | -load ${KDBTESTS}/helperfunctions.q ${testpath}/../settings.q ${testpath}/settings.q ${testpath}/../mockdata.q \ 17 | -testresults ${KDBTESTS}/results/ \ 18 | -runtime $run \ 19 | -procfile ${testpath}/config/process.csv \ 20 | -dataaccess ${testpath}/config/tableproperties.csv \ 21 | $debug $stop $write $quiet 22 | 23 | ${TORQHOME}/torq.sh stop discovery1 24 | -------------------------------------------------------------------------------- /tests/dataaccess/common/settings.q: -------------------------------------------------------------------------------- 1 | testpath:hsym`$getenv[`KDBTESTS],"/dataaccess/common"; 2 | processcsv:` sv testpath,`config`process.csv; 3 | 4 | //- code to pass in a test name 5 | //- extract the input parameter from {testname}.csv 6 | //- extract the expected error from checkinputerrors.csv 7 | //- compare error with expected error 8 | checkreturnederror:{[test]errors[test;`error]~@[.checkinputs.checkinputs;gettestparams test;::]}; 9 | checkreturnederrorcustom:{[test;param]errors[test;`error]~@[.checkinputs.checkinputs;param;::]}; 10 | 11 | //- read dictionary of params from csv named according to the test {testname}.csv 12 | gettestparams:{[test]exec parameter!get each parametervalue from .checkinputs.readcsv[` sv testpath,`testdata,`$string[test],".csv";"s*"]}; 13 | -------------------------------------------------------------------------------- /tests/dataaccess/common/testdata/aggregationdict.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | tablename,`xdaily 3 | starttime,2000.01.010D 4 | endtime,.z.p 5 | timecolumn,`time 6 | aggregations,` 7 | -------------------------------------------------------------------------------- /tests/dataaccess/common/testdata/aggregationkey.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | tablename,`xdaily 3 | starttime,2000.01.010D 4 | endtime,.z.p 5 | timecolumn,`time 6 | aggregations,"(""min"";""max"")!(""sym"";""time"")" 7 | -------------------------------------------------------------------------------- /tests/dataaccess/common/testdata/aggregationvalues.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | tablename,`xdaily 3 | starttime,2000.01.010D 4 | endtime,.z.p 5 | timecolumn,`time 6 | aggregations,"`min`max!(""sym"";""time"")" 7 | -------------------------------------------------------------------------------- /tests/dataaccess/common/testdata/badordering.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | tablename,`trade 3 | starttime,2000.01.010D 4 | endtime,.z.p 5 | columns,`sym`price 6 | ordering,enlist(`asc`size) 7 | -------------------------------------------------------------------------------- /tests/dataaccess/common/testdata/checktimeorder.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | tablename,`xdaily 3 | starttime,2000.01.02D 4 | endtime,2000.01.01D 5 | timecolumn,`time 6 | -------------------------------------------------------------------------------- /tests/dataaccess/common/testdata/columntypes.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | tablename,`xdaily 3 | starttime,2000.01.010D 4 | endtime,.z.p 5 | timecolumn,`time 6 | columns,"(""sym"";""time"")" 7 | -------------------------------------------------------------------------------- /tests/dataaccess/common/testdata/endtimetype.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | tablename,`xdaily 3 | starttime,2000.01.010D 4 | endtime,23:59 5 | timecolumn,`time 6 | -------------------------------------------------------------------------------- /tests/dataaccess/common/testdata/filterequality.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | tablename,`xdaily 3 | starttime,2000.01.010D 4 | endtime,.z.p 5 | timecolumn,`time 6 | filters,(`sym`bidprice`askprice!(enlist(>=;`DOW`AAPL);((<;90);(>;60));enlist(within;10 20))) 7 | -------------------------------------------------------------------------------- /tests/dataaccess/common/testdata/filterformat.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | tablename,`xdaily 3 | starttime,2000.01.010D 4 | endtime,.z.p 5 | timecolumn,`time 6 | filters,"""(like;`source;"*")""" 7 | -------------------------------------------------------------------------------- /tests/dataaccess/common/testdata/filternot.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | tablename,`xdaily 3 | starttime,2000.01.010D 4 | endtime,.z.p 5 | timecolumn,`time 6 | filters,(`sym`bidprice`askprice!(enlist(not;`AAPL);((<;90);(>;60));enlist(within;10 20))) 7 | -------------------------------------------------------------------------------- /tests/dataaccess/common/testdata/filterwithin.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | tablename,`xdaily 3 | starttime,2000.01.010D 4 | endtime,.z.p 5 | timecolumn,`time 6 | filters,(`sym`bidprice`askprice!(enlist(=;`AAPL);((<;90);(>;60));enlist(within;20))) 7 | -------------------------------------------------------------------------------- /tests/dataaccess/common/testdata/freeformbytype.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | tablename,`xdaily 3 | starttime,2000.01.010D 4 | endtime,.z.p 5 | timecolumn,`time 6 | freeformby,` 7 | -------------------------------------------------------------------------------- /tests/dataaccess/common/testdata/freeformcolumntype.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | tablename,`xdaily 3 | starttime,2000.01.010D 4 | endtime,.z.p 5 | timecolumn,`time 6 | freeformcolumn,` 7 | -------------------------------------------------------------------------------- /tests/dataaccess/common/testdata/freeformwheretype.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | tablename,`xdaily 3 | starttime,2000.01.010D 4 | endtime,.z.p 5 | timecolumn,`time 6 | freeformwhere,((<;`price;100);(<;`size;10)) 7 | -------------------------------------------------------------------------------- /tests/dataaccess/common/testdata/groupingtype.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | tablename,`xdaily 3 | starttime,2000.01.010D 4 | endtime,.z.p 5 | timecolumn,`time 6 | grouping,"(""sym"";""source"")" 7 | -------------------------------------------------------------------------------- /tests/dataaccess/common/testdata/instrumenttype.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | tablename,`xdaily 3 | starttime,2000.01.010D 4 | endtime,.z.p 5 | timecolumn,`time 6 | instruments,"(""AUDUSD"";""EURUSD"")" 7 | -------------------------------------------------------------------------------- /tests/dataaccess/common/testdata/invalidcomb1.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | tablename,`xdaily 3 | starttime,2000.01.010D 4 | endtime,.z.p 5 | timecolumn,`time 6 | instruments,`AUDCHF`EURUSD 7 | columns,`time`sym 8 | aggregations,`max`min!(`mid`bidprice`askprice;(`asksize`askprice;`bidsize`bidprice)) 9 | timebar,(`time;10;`nanosecond) 10 | filters,((like;`source;"source?");(<;`sourcetime;0wp)) 11 | freeformwhere,"""bidprice<0w,bidsize<0w""" 12 | freeformby,"""sym:sym,source:source""" 13 | freeformcolumn,"""sym:sym,source:source""" 14 | -------------------------------------------------------------------------------- /tests/dataaccess/common/testdata/invalidcomb2.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | tablename,`xdaily 3 | starttime,2000.01.010D 4 | endtime,.z.p 5 | timecolumn,`time 6 | instruments,`AUDCHF`EURUSD 7 | aggregations,`max`min!(`mid`bidprice`askprice;(`asksize`askprice;`bidsize`bidprice)) 8 | timebar,(`time;10;`nanosecond) 9 | filters,((like;`source;"source?");(<;`sourcetime;0wp)) 10 | freeformwhere,"""bidprice<0w,bidsize<0w""" 11 | freeformby,"""sym:sym,source:source""" 12 | freeformcolumn,"""sym:sym,source:source""" 13 | -------------------------------------------------------------------------------- /tests/dataaccess/common/testdata/invalidfilterkey.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | tablename,`xdaily 3 | starttime,2000.01.010D 4 | endtime,.z.p 5 | timecolumn,`time 6 | filters,(0 1 2!(enlist(like;"AAPL");((<;85);(>;83.5));enlist(not;within;5 43))) 7 | -------------------------------------------------------------------------------- /tests/dataaccess/common/testdata/invalidfilterop.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | tablename,`xdaily 3 | starttime,2000.01.010D 4 | endtime,.z.p 5 | timecolumn,`time 6 | filters,`sym`bid`ask!(enlist(=;`AAPL);enlist(85);enlist(not;within;10 20)) 7 | -------------------------------------------------------------------------------- /tests/dataaccess/common/testdata/invalidfilterop1.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | tablename,`xdaily 3 | starttime,2000.01.010D 4 | endtime,.z.p 5 | timecolumn,`time 6 | filters,(`sym`bid`ask!(enlist(last;`AAPL);((<;90);(>;60));enlist(within;10 20))) 7 | -------------------------------------------------------------------------------- /tests/dataaccess/common/testdata/invalidparamnames.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | tablename,`tablename 3 | starttime,2000.01.010D 4 | endtime,.z.p 5 | timecolumn,`time 6 | invalidname1,`invalid 7 | invalidname2,`invalid 8 | -------------------------------------------------------------------------------- /tests/dataaccess/common/testdata/multiparams.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | tablename,`xdaily 3 | starttime,00:00 4 | starttime,00:00 5 | endtime,23:59 6 | -------------------------------------------------------------------------------- /tests/dataaccess/common/testdata/noordering.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | tablename,`trade 3 | starttime,2000.01.010D 4 | endtime,.z.p 5 | timecolumn,`time 6 | aggregations,`sum`max!(`price`price) 7 | ordering,enlist(`asc`bidprice) 8 | -------------------------------------------------------------------------------- /tests/dataaccess/common/testdata/orderingordering.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | tablename,`xdaily 3 | starttime,2000.01.010D 4 | endtime,.z.p 5 | timecolumn,`time 6 | ordering,enlist(`price`asc) 7 | -------------------------------------------------------------------------------- /tests/dataaccess/common/testdata/orderingordering1.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | tablename,`xdaily 3 | starttime,2000.01.010D 4 | endtime,.z.p 5 | timecolumn,`time 6 | ordering,enlist(`price`asc`desc`sym) 7 | -------------------------------------------------------------------------------- /tests/dataaccess/common/testdata/orderingpairing.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | tablename,`xdaily 3 | starttime,2000.01.010D 4 | endtime,.z.p 5 | timecolumn,`time 6 | ordering,enlist("asc price") 7 | -------------------------------------------------------------------------------- /tests/dataaccess/common/testdata/postbackfail.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | tablename,`xdaily 3 | starttime,2000.01.010D 4 | endtime,.z.p 5 | postback,{x+y} 6 | -------------------------------------------------------------------------------- /tests/dataaccess/common/testdata/requiredparamsmissing.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | starttime,2000.01.010D 3 | endtime,.z.p 4 | timecolumn,`time 5 | -------------------------------------------------------------------------------- /tests/dataaccess/common/testdata/starttimetype.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | tablename,`xdaily 3 | starttime,00:00 4 | endtime,23:59 5 | timecolumn,`time 6 | -------------------------------------------------------------------------------- /tests/dataaccess/common/testdata/tablenametypeerror.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | tablename,"""tablename""" 3 | starttime,2000.01.010D 4 | endtime,.z.p 5 | timecolumn,`time 6 | -------------------------------------------------------------------------------- /tests/dataaccess/common/testdata/timebararg0.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | tablename,`xdaily 3 | starttime,2000.01.010D 4 | endtime,.z.p 5 | timecolumn,`time 6 | timebar,"(""ten"";`minute;`time)" 7 | -------------------------------------------------------------------------------- /tests/dataaccess/common/testdata/timebararg1.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | tablename,`xdaily 3 | starttime,2000.01.010D 4 | endtime,.z.p 5 | timecolumn,`time 6 | timebar,(10;"minute";`time) 7 | -------------------------------------------------------------------------------- /tests/dataaccess/common/testdata/timebararg2.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | tablename,`xdaily 3 | starttime,2000.01.010D 4 | endtime,.z.p 5 | timecolumn,`time 6 | timebar,"(10;`minute;""time"")" 7 | -------------------------------------------------------------------------------- /tests/dataaccess/common/testdata/timebarargstype.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | tablename,`xdaily 3 | starttime,2000.01.010D 4 | endtime,.z.p 5 | timecolumn,`time 6 | timebar,` 7 | -------------------------------------------------------------------------------- /tests/dataaccess/common/testdata/timebarcount.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | tablename,`xdaily 3 | starttime,2000.01.010D 4 | endtime,.z.p 5 | timecolumn,`time 6 | timebar,(`time;10;`nanosecond;`invalid) 7 | -------------------------------------------------------------------------------- /tests/dataaccess/common/testdata/timecolumntype.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | tablename,`xdaily 3 | starttime,2000.01.010D 4 | endtime,.z.p 5 | timecolumn,"""time""" 6 | -------------------------------------------------------------------------------- /tests/dataaccess/common/testdata/vagueordering.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | tablename,`xdaily 3 | starttime,2000.01.010D 4 | endtime,.z.p 5 | timecolumn,`time 6 | aggregations,`sum`max!(`price`price) 7 | ordering,enlist(`asc`price) 8 | -------------------------------------------------------------------------------- /tests/dataaccess/common/testdata/validinput1.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | tablename,`xdaily 3 | starttime,2000.01.01D 4 | endtime,2000.01.06D10:00 5 | instruments,`AUDUSD 6 | columns,`bidprice`bidsize`askprice`asksize 7 | timebar,(1;`hour;`time) 8 | filters,`source`sourcetime!(enlist(like;"source?");enlist(<;0wp)) 9 | freeformwhere,"""bidprice<0w,bidsize<0w""" 10 | freeformby,"""sym:sym,source:source""" 11 | freeformcolumn,"""sym:sym,source:source""" 12 | -------------------------------------------------------------------------------- /tests/dataaccess/common/testdata/validinput2.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | tablename,`xdaily 3 | starttime,2000.01.01 4 | endtime,2000.01.06 5 | timecolumn,`time 6 | instruments,`AUDUSD`EURUSD 7 | grouping,`sym`source 8 | aggregations,`min`max`wavg!(`bidprice`askprice;`bidprice`askprice;(`bidsize`bidprice;`asksize`askprice)) 9 | filters,`source`sourcetime!(enlist(like;"source?");(enlist(>;0wp))) 10 | freeformwhere,"""bidprice<0w,bidsize<0w""" 11 | freeformby,"""src:source,s:sym""" 12 | -------------------------------------------------------------------------------- /tests/dataaccess/common/testdata/validinput3.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | tablename,`xdaily 3 | starttime,2000.01.01D 4 | endtime,2000.01.06D12:00 5 | timecolumn,`time 6 | instruments,`AUDUSD`EURUSD 7 | grouping,`sym`source 8 | aggregations,`min`max`wavg!(`bidprice`askprice;`bidprice`askprice;(`bidsize`bidprice;`asksize`askprice)) 9 | timebar,(6;`hour;`sourcetime) 10 | filters,`source`sourcetime!(enlist(like;"source?");enlist(<;0wp)) 11 | freeformwhere,"""bidprice<0w,bidsize<0w""" 12 | freeformby,"""src:source,s:sym""" 13 | -------------------------------------------------------------------------------- /tests/dataaccess/extractqueryparam/config/process.csv: -------------------------------------------------------------------------------- 1 | host,port,proctype,procname,U,localtime,g,T,w,load,startwithall,extras,qcmd 2 | localhost,{KDBBASEPORT}+1,discovery,discovery1,${TORQAPPHOME}/appconfig/passwords/accesslist.txt,1,0,,,${KDBCODE}/processes/discovery.q,1,,q 3 | localhost,{KDBBASEPORT}+2,rdb,dailyrdb1,${TORQAPPHOME}/appconfig/passwords/accesslist.txt,1,0,,,${TORQHOME}/tests/dataaccess/extractqueryparam/settings.q ${TORQHOME}/tests/dataaccess/mockdata.q,1,-dataaccess ${KDBTESTS}/dataaccess/extractqueryparam/config/tableproperties.csv,q 4 | 5 | -------------------------------------------------------------------------------- /tests/dataaccess/extractqueryparam/config/tableproperties.csv: -------------------------------------------------------------------------------- 1 | proctype,tablename,primarytimecolumn,attributecolumn,instrumentcolumn,rolltimeoffset,rolltimezone,datatimezone,partitionfield 2 | ,xdaily,time,sym,sym,,,, -------------------------------------------------------------------------------- /tests/dataaccess/extractqueryparam/input/columns.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | tablename,`xdaily 3 | starttime,2000.01.01D00:00:00.000000000 4 | endtime,2000.01.06D10:00:00.000000000 5 | columns,`sym`time`sourcetime`bidprice`askprice 6 | metainfo,`partfield`metas`proctype`starttime`endtime!(`;(flip (enlist`columns)!enlist`sym`source`id`time`sourcetime`bidprice`bidsize`askprice`asksize)!(flip `types`attributes!("ssCppffff";`p````````));`rdb;2000.01.01D00:00:00.000000000;2000.01.06D10:00:00.000000000) 7 | tableproperties,`primarytimecolumn`attributecolumn`instrumentcolumn`timezone`getrollover`getpartitionrange`partfield!`time`sym`sym`UTC`.dataaccess.testfuncrollover`.dataaccess.testfuncpartitionrange` 8 | timecolumn ,`time 9 | -------------------------------------------------------------------------------- /tests/dataaccess/extractqueryparam/input/filters.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | tablename,`xdaily 3 | starttime,2000.01.01D00:00:00.000000000 4 | endtime,2000.01.06D10:00:00.000000000 5 | filters,`sym`source!(enlist(=;`AUDUSD);enlist(=;`source0)) 6 | metainfo,`partfield`metas`proctype`starttime`endtime!(`;(flip (enlist`columns)!enlist`sym`source`id`time`sourcetime`bidprice`bidsize`askprice`asksize)!(flip `types`attributes!("ssCppffff";`p````````));`rdb;2000.01.01D00:00:00.000000000;2000.01.06D10:00:00.000000000) 7 | tableproperties,`primarytimecolumn`attributecolumn`instrumentcolumn`timezone`getrollover`getpartitionrange`partfield!`time`sym`sym`UTC`.dataaccess.testfuncrollover`.dataaccess.testfuncpartitionrange` 8 | timecolumn ,`time 9 | -------------------------------------------------------------------------------- /tests/dataaccess/extractqueryparam/input/freeformfilters.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | tablename,`xdaily 3 | starttime,2000.01.01D00:00:00.000000000 4 | endtime,2000.01.06D10:00:00.000000000 5 | freeformwhere,"""source=`source1"" 6 | metainfo,`partfield`metas`proctype`starttime`endtime!(`;(flip (enlist`columns)!enlist`sym`source`id`time`sourcetime`bidprice`bidsize`askprice`asksize)!(flip `types`attributes!("ssCppffff";`p````````));`rdb;2000.01.01D00:00:00.000000000;2000.01.06D10:00:00.000000000) 7 | tableproperties,`primarytimecolumn`attributecolumn`instrumentcolumn`timezone`getrollover`getpartitionrange`partfield!`time`sym`sym`UTC`.dataaccess.testfuncrollover`.dataaccess.testfuncpartitionrange` 8 | timecolumn ,`time 9 | -------------------------------------------------------------------------------- /tests/dataaccess/extractqueryparam/input/freeformselect.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | tablename,`xdaily 3 | starttime,2000.01.01D00:00:00.000000000 4 | endtime,2000.01.06D10:00:00.000000000 5 | freeformcolumn,"""sym,time,mid:0.5*bidprice+askprice"" 6 | metainfo,`partfield`metas`proctype`starttime`endtime!(`;(flip (enlist`columns)!enlist`sym`source`id`time`sourcetime`bidprice`bidsize`askprice`asksize)!(flip `types`attributes!("ssCppffff";`p````````));`rdb;2000.01.01D00:00:00.000000000;2000.01.06D10:00:00.000000000) 7 | tableproperties,`primarytimecolumn`attributecolumn`instrumentcolumn`timezone`getrollover`getpartitionrange`partfield!`time`sym`sym`UTC`.dataaccess.testfuncrollover`.dataaccess.testfuncpartitionrange` 8 | timecolumn ,`time 9 | -------------------------------------------------------------------------------- /tests/dataaccess/extractqueryparam/input/grouping.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | tablename,`xdaily 3 | starttime,2000.01.01D00:00:00.000000000 4 | endtime,2000.01.06D10:00:00.000000000 5 | freeformcolumn,"""avgmid:avg 0.5*bidprice+askprice"" 6 | grouping,`sym 7 | metainfo,`partfield`metas`proctype`starttime`endtime!(`;(flip (enlist`columns)!enlist`sym`source`id`time`sourcetime`bidprice`bidsize`askprice`asksize)!(flip `types`attributes!("ssCppffff";`p````````));`rdb;2000.01.01D00:00:00.000000000;2000.01.06D10:00:00.000000000) 8 | tableproperties,`primarytimecolumn`attributecolumn`instrumentcolumn`timezone`getrollover`getpartitionrange`partfield!`time`sym`sym`UTC`.dataaccess.testfuncrollover`.dataaccess.testfuncpartitionrange` 9 | timecolumn ,`time 10 | -------------------------------------------------------------------------------- /tests/dataaccess/extractqueryparam/input/instrumentfilter.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | tablename,`xdaily 3 | starttime,2000.01.01D00:00:00.000000000 4 | endtime,2000.01.06D10:00:00.000000000 5 | instruments,`AUDUSD 6 | metainfo,`partfield`metas`proctype`starttime`endtime!(`;(flip (enlist`columns)!enlist`sym`source`id`time`sourcetime`bidprice`bidsize`askprice`asksize)!(flip `types`attributes!("ssCppffff";`p````````));`rdb;2000.01.01D00:00:00.000000000;2000.01.06D10:00:00.000000000) 7 | tableproperties,`primarytimecolumn`attributecolumn`instrumentcolumn`timezone`getrollover`getpartitionrange`partfield!`time`sym`sym`UTC`.dataaccess.testfuncrollover`.dataaccess.testfuncpartitionrange` 8 | timecolumn ,`time 9 | -------------------------------------------------------------------------------- /tests/dataaccess/extractqueryparam/input/query1.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | tablename,`xdaily 3 | starttime,2000.01.01D00:00:00.000000000 4 | endtime,2000.01.06D10:00:00.000000000 5 | metainfo,`partfield`metas`proctype`starttime`endtime!(`;(flip (enlist`columns)!enlist`sym`source`id`time`sourcetime`bidprice`bidsize`askprice`asksize)!(flip `types`attributes!("ssCppffff";`p````````));`rdb;2000.01.01D00:00:00.000000000;2000.01.06D10:00:00.000000000) 6 | tableproperties,`primarytimecolumn`attributecolumn`instrumentcolumn`timezone`getrollover`getpartitionrange`partfield!`time`sym`sym`UTC`.dataaccess.testfuncrollover`.dataaccess.testfuncpartitionrange` 7 | timecolumn ,`time 8 | -------------------------------------------------------------------------------- /tests/dataaccess/extractqueryparam/input/string.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | tablename,`xdaily 3 | starttime,2000.01.01D00:00:00.000000000 4 | endtime,2000.01.06D10:00:00.000000000 5 | freeformcolumn,"""avgmid:avg 0.5*bidprice+askprice"" 6 | freeformby,"""sym:sym,source:source"" 7 | metainfo,`partfield`metas`proctype`starttime`endtime!(`;(flip (enlist`columns)!enlist`sym`source`id`time`sourcetime`bidprice`bidsize`askprice`asksize)!(flip `types`attributes!("ssCppffff";`p````````));`rdb;2000.01.01D00:00:00.000000000;2000.01.06D10:00:00.000000000) 8 | tableproperties,`primarytimecolumn`attributecolumn`instrumentcolumn`timezone`getrollover`getpartitionrange`partfield!`time`sym`sym`UTC`.dataaccess.testfuncrollover`.dataaccess.testfuncpartitionrange` 9 | timecolumn ,`time 10 | -------------------------------------------------------------------------------- /tests/dataaccess/extractqueryparam/output/columns.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | tablename,`xdaily 3 | partitionfilter,() 4 | attributecolumn,`sym 5 | timefilter,enlist(within;`time;2000.01.01D00:00:00.000000000 2000.01.06D10:00:00.000000000) 6 | instrumentfilter,() 7 | columns,`sym`time`sourcetime`bidprice`askprice!`sym`time`sourcetime`bidprice`askprice 8 | grouping,() 9 | aggregations,() 10 | filters,() 11 | ordering,() 12 | freeformwhere,() 13 | freeformby,() 14 | freeformcolumn,() 15 | optimisation,1b 16 | proctype,`rdb 17 | tableproperties ,`primarytimecolumn`attributecolumn`instrumentcolumn`timezone`getrollover`getpartitionrange`partfield!`time`sym`sym`UTC`.dataaccess.testfuncrollover`.dataaccess.testfuncpartitionrange` 18 | renamecolumn,()!() 19 | -------------------------------------------------------------------------------- /tests/dataaccess/extractqueryparam/output/filters.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | tablename,`xdaily 3 | partitionfilter,() 4 | attributecolumn,`sym 5 | timefilter,enlist(within;`time;2000.01.01D00:00:00.000000000 2000.01.06D10:00:00.000000000) 6 | instrumentfilter,() 7 | columns,() 8 | grouping,() 9 | aggregations,() 10 | filters,((=;`sym;enlist`AUDUSD);(=;`source;enlist`source0)) 11 | ordering,() 12 | freeformwhere,() 13 | freeformby,() 14 | freeformcolumn,() 15 | optimisation,1b 16 | proctype,`rdb 17 | tableproperties ,`primarytimecolumn`attributecolumn`instrumentcolumn`timezone`getrollover`getpartitionrange`partfield!`time`sym`sym`UTC`.dataaccess.testfuncrollover`.dataaccess.testfuncpartitionrange` 18 | renamecolumn,()!() 19 | -------------------------------------------------------------------------------- /tests/dataaccess/extractqueryparam/output/freeformfilters.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | tablename,`xdaily 3 | partitionfilter,() 4 | attributecolumn,`sym 5 | timefilter,enlist(within;`time;2000.01.01D00:00:00.000000000 2000.01.06D10:00:00.000000000) 6 | instrumentfilter,() 7 | columns,() 8 | grouping,() 9 | aggregations,() 10 | filters,() 11 | ordering,() 12 | freeformwhere,enlist(=;`source;enlist`source1) 13 | freeformby,() 14 | freeformcolumn,() 15 | optimisation,1b 16 | proctype,`rdb 17 | tableproperties ,`primarytimecolumn`attributecolumn`instrumentcolumn`timezone`getrollover`getpartitionrange`partfield!`time`sym`sym`UTC`.dataaccess.testfuncrollover`.dataaccess.testfuncpartitionrange` 18 | renamecolumn,()!() 19 | -------------------------------------------------------------------------------- /tests/dataaccess/extractqueryparam/output/freeformselect.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | tablename,`xdaily 3 | partitionfilter,() 4 | attributecolumn,`sym 5 | timefilter,enlist(within;`time;2000.01.01D00:00:00.000000000 2000.01.06D10:00:00.000000000) 6 | instrumentfilter,() 7 | columns,() 8 | grouping,() 9 | aggregations,() 10 | filters,() 11 | ordering,() 12 | freeformwhere,() 13 | freeformby,() 14 | freeformcolumn,`sym`time`mid!(`sym;`time;(*;0.5;(+;`bidprice;`askprice))) 15 | optimisation,1b 16 | proctype,`rdb 17 | tableproperties ,`primarytimecolumn`attributecolumn`instrumentcolumn`timezone`getrollover`getpartitionrange`partfield!`time`sym`sym`UTC`.dataaccess.testfuncrollover`.dataaccess.testfuncpartitionrange` 18 | renamecolumn,()!() 19 | -------------------------------------------------------------------------------- /tests/dataaccess/extractqueryparam/output/grouping.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | tablename,`xdaily 3 | partitionfilter,() 4 | attributecolumn,`sym 5 | timefilter,enlist(within;`time;2000.01.01D00:00:00.000000000 2000.01.06D10:00:00.000000000) 6 | instrumentfilter,() 7 | columns,() 8 | grouping,(enlist`sym)!enlist`sym 9 | aggregations,() 10 | filters,() 11 | ordering,() 12 | freeformwhere,() 13 | freeformby,() 14 | freeformcolumn,(enlist`avgmid)!enlist(avg;(*;0.5;(+;`bidprice;`askprice))) 15 | optimisation,1b 16 | proctype,`rdb 17 | tableproperties ,`primarytimecolumn`attributecolumn`instrumentcolumn`timezone`getrollover`getpartitionrange`partfield!`time`sym`sym`UTC`.dataaccess.testfuncrollover`.dataaccess.testfuncpartitionrange` 18 | renamecolumn,()!() 19 | -------------------------------------------------------------------------------- /tests/dataaccess/extractqueryparam/output/instrumentfilter.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | tablename,`xdaily 3 | partitionfilter,() 4 | attributecolumn,`sym 5 | timefilter,enlist(within;`time;2000.01.01D00:00:00.000000000 2000.01.06D10:00:00.000000000) 6 | instrumentfilter,enlist(=;`sym;enlist`AUDUSD) 7 | columns,() 8 | grouping,() 9 | aggregations,() 10 | filters,() 11 | ordering,() 12 | freeformwhere,() 13 | freeformby,() 14 | freeformcolumn,() 15 | optimisation,1b 16 | proctype,`rdb 17 | tableproperties ,`primarytimecolumn`attributecolumn`instrumentcolumn`timezone`getrollover`getpartitionrange`partfield!`time`sym`sym`UTC`.dataaccess.testfuncrollover`.dataaccess.testfuncpartitionrange` 18 | renamecolumn,()!() 19 | -------------------------------------------------------------------------------- /tests/dataaccess/extractqueryparam/output/query1.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | tablename,`xdaily 3 | partitionfilter,() 4 | attributecolumn,`sym 5 | timefilter,enlist(within;`time;2000.01.01D00:00:00.000000000 2000.01.06D10:00:00.000000000) 6 | instrumentfilter,() 7 | columns,() 8 | grouping,() 9 | aggregations,() 10 | filters,() 11 | ordering,() 12 | freeformwhere,() 13 | freeformby,() 14 | freeformcolumn,() 15 | optimisation,1b 16 | proctype,`rdb 17 | tableproperties ,`primarytimecolumn`attributecolumn`instrumentcolumn`timezone`getrollover`getpartitionrange`partfield!`time`sym`sym`UTC`.dataaccess.testfuncrollover`.dataaccess.testfuncpartitionrange` 18 | renamecolumn,()!() 19 | -------------------------------------------------------------------------------- /tests/dataaccess/extractqueryparam/output/string.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | tablename,`xdaily 3 | partitionfilter,() 4 | attributecolumn,`sym 5 | timefilter,enlist(within;`time;2000.01.01D00:00:00.000000000 2000.01.06D10:00:00.000000000) 6 | instrumentfilter,() 7 | columns,() 8 | grouping,() 9 | aggregations,() 10 | filters,() 11 | ordering,() 12 | freeformwhere,() 13 | freeformby,`sym`source!`sym`source 14 | freeformcolumn,(enlist`avgmid)!enlist(avg;(*;0.5;(+;`bidprice;`askprice))) 15 | optimisation,1b 16 | proctype,`rdb 17 | tableproperties ,`primarytimecolumn`attributecolumn`instrumentcolumn`timezone`getrollover`getpartitionrange`partfield!`time`sym`sym`UTC`.dataaccess.testfuncrollover`.dataaccess.testfuncpartitionrange` 18 | renamecolumn,()!() 19 | -------------------------------------------------------------------------------- /tests/dataaccess/gwquerytest/inputs/hdbproc.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | tablename,`xdaily 3 | starttime,2000.01.03D00:00:00.000000000 4 | endtime,2000.01.04D00:00:00.000000000 5 | -------------------------------------------------------------------------------- /tests/dataaccess/gwquerytest/inputs/mapreducemulti.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | tablename,`xdaily 3 | starttime,2000.01.01D00:00:00.000000000 4 | endtime,2000.01.06D23:59:00.000000000 5 | aggregations,(enlist `max)!(enlist`askprice) 6 | grouping,`sym 7 | -------------------------------------------------------------------------------- /tests/dataaccess/gwquerytest/inputs/multiproc.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | tablename,`xdaily 3 | starttime,2000.01.01D00:00:00.000000000 4 | endtime,2000.01.06D23:59:00.000000000 5 | -------------------------------------------------------------------------------- /tests/dataaccess/gwquerytest/inputs/rdbproc.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | tablename,`xdaily 3 | starttime,2000.01.06D00:00:00.000000000 4 | endtime,2000.01.06D17:00:00.000000000 5 | -------------------------------------------------------------------------------- /tests/dataaccess/gwquerytest/inputs/singleproc.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | tablename,`xdaily 3 | starttime,2000.01.01D00:00:00.000000000 4 | endtime,2000.01.04D00:00:00.000000000 5 | -------------------------------------------------------------------------------- /tests/dataaccess/gwquerytest/rdbhelper.q: -------------------------------------------------------------------------------- 1 | .rdb.rdbpartition: enlist 2000.01.06; 2 | -------------------------------------------------------------------------------- /tests/dataaccess/gwquerytest/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Handle command-line arguments 4 | source $KDBTESTS/flagparse.sh 5 | 6 | # Path to test directory 7 | testpath=${KDBTESTS}/dataaccess/gwquerytest 8 | 9 | # Start procs 10 | ${TORQHOME}/torq.sh start all -csv ${testpath}/process.csv 11 | 12 | # Start test proc 13 | /usr/bin/rlwrap q ${TORQHOME}/torq.q \ 14 | -proctype test -procname test1 \ 15 | -test ${testpath} \ 16 | -load ${KDBTESTS}/helperfunctions.q ${testpath}/settings.q \ 17 | -testresults ${KDBTESTS}/dataaccess/results/ \ 18 | -runtime $run \ 19 | -procfile ${testpath}/process.csv \ 20 | $debug $stop $write $quiet 21 | 22 | # Shut down procs 23 | ${TORQHOME}/torq.sh stop all -csv ${testpath}/process.csv 24 | -------------------------------------------------------------------------------- /tests/dataaccess/gwquerytest/settings.q: -------------------------------------------------------------------------------- 1 | // IPC connection parameters 2 | .servers.CONNECTIONS:`gateway; 3 | .servers.USERPASS:`admin:admin; 4 | 5 | testpath:hsym`$getenv[`KDBTESTS],"/dataaccess/gwquerytest"; 6 | 7 | sublistvalue:2; 8 | 9 | getdict:{exec parameter!get each parametervalue from (("s*";1#",")0: ` sv testpath,`inputs,`$string[x],".csv")} 10 | -------------------------------------------------------------------------------- /tests/dataaccess/queryorder/config/process.csv: -------------------------------------------------------------------------------- 1 | host,port,proctype,procname,U,localtime,g,T,w,load,startwithall,extras,qcmd 2 | localhost,{KDBBASEPORT}+1,discovery,discovery1,${TORQAPPHOME}/appconfig/passwords/accesslist.txt,1,0,,,${KDBCODE}/processes/discovery.q,1,,q 3 | localhost,{KDBBASEPORT}+2,rdb,dailyrdb1,${TORQAPPHOME}/appconfig/passwords/accesslist.txt,1,0,,,${TORQHOME}/tests/dataaccess/checkinputs/settings.q ${TORQHOME}/tests/dataaccess/mockdata.q,1,-dataaccess ${KDBTESTS}/dataaccess/checkinputs/config/tableproperties.csv,q 4 | localhost,{KDBBASEPORT}+3,hdb,dailyhdb1,${TORQAPPHOME}/appconfig/passwords/accesslist.txt,1,0,,,${TORQHOME}/tests/dataaccess/checkinputs/settings.q ${TORQHOME}/tests/dataaccess/mockdata.q,1,-dataaccess ${KDBTESTS}/dataaccess/checkinputs/config/tableproperties.csv,q 5 | -------------------------------------------------------------------------------- /tests/dataaccess/queryorder/config/tableproperties.csv: -------------------------------------------------------------------------------- 1 | proctype,tablename,primarytimecolumn,attributecolumn,instrumentcolumn,rolltimeoffset,rolltimezone,datatimezone,partitionfield 2 | ,xdaily,time,sym,sym,,,, -------------------------------------------------------------------------------- /tests/dataaccess/queryorder/hdb/2021.01.04/packets/.d: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/dataaccess/queryorder/hdb/2021.01.04/packets/.d -------------------------------------------------------------------------------- /tests/dataaccess/queryorder/hdb/2021.01.04/packets/ack: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/dataaccess/queryorder/hdb/2021.01.04/packets/ack -------------------------------------------------------------------------------- /tests/dataaccess/queryorder/hdb/2021.01.04/packets/data: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/dataaccess/queryorder/hdb/2021.01.04/packets/data -------------------------------------------------------------------------------- /tests/dataaccess/queryorder/hdb/2021.01.04/packets/dest: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/dataaccess/queryorder/hdb/2021.01.04/packets/dest -------------------------------------------------------------------------------- /tests/dataaccess/queryorder/hdb/2021.01.04/packets/destport: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/dataaccess/queryorder/hdb/2021.01.04/packets/destport -------------------------------------------------------------------------------- /tests/dataaccess/queryorder/hdb/2021.01.04/packets/flags: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/dataaccess/queryorder/hdb/2021.01.04/packets/flags -------------------------------------------------------------------------------- /tests/dataaccess/queryorder/hdb/2021.01.04/packets/len: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/dataaccess/queryorder/hdb/2021.01.04/packets/len -------------------------------------------------------------------------------- /tests/dataaccess/queryorder/hdb/2021.01.04/packets/length: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/dataaccess/queryorder/hdb/2021.01.04/packets/length -------------------------------------------------------------------------------- /tests/dataaccess/queryorder/hdb/2021.01.04/packets/protocol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/dataaccess/queryorder/hdb/2021.01.04/packets/protocol -------------------------------------------------------------------------------- /tests/dataaccess/queryorder/hdb/2021.01.04/packets/seq: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/dataaccess/queryorder/hdb/2021.01.04/packets/seq -------------------------------------------------------------------------------- /tests/dataaccess/queryorder/hdb/2021.01.04/packets/src: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/dataaccess/queryorder/hdb/2021.01.04/packets/src -------------------------------------------------------------------------------- /tests/dataaccess/queryorder/hdb/2021.01.04/packets/srcport: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/dataaccess/queryorder/hdb/2021.01.04/packets/srcport -------------------------------------------------------------------------------- /tests/dataaccess/queryorder/hdb/2021.01.04/packets/sym: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/dataaccess/queryorder/hdb/2021.01.04/packets/sym -------------------------------------------------------------------------------- /tests/dataaccess/queryorder/hdb/2021.01.04/packets/time: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/dataaccess/queryorder/hdb/2021.01.04/packets/time -------------------------------------------------------------------------------- /tests/dataaccess/queryorder/hdb/2021.01.04/packets/tsecr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/dataaccess/queryorder/hdb/2021.01.04/packets/tsecr -------------------------------------------------------------------------------- /tests/dataaccess/queryorder/hdb/2021.01.04/packets/tsval: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/dataaccess/queryorder/hdb/2021.01.04/packets/tsval -------------------------------------------------------------------------------- /tests/dataaccess/queryorder/hdb/2021.01.04/packets/win: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/dataaccess/queryorder/hdb/2021.01.04/packets/win -------------------------------------------------------------------------------- /tests/dataaccess/queryorder/hdb/2021.01.04/quote/.d: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/dataaccess/queryorder/hdb/2021.01.04/quote/.d -------------------------------------------------------------------------------- /tests/dataaccess/queryorder/hdb/2021.01.04/quote/asize: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/dataaccess/queryorder/hdb/2021.01.04/quote/asize -------------------------------------------------------------------------------- /tests/dataaccess/queryorder/hdb/2021.01.04/quote/ask: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/dataaccess/queryorder/hdb/2021.01.04/quote/ask -------------------------------------------------------------------------------- /tests/dataaccess/queryorder/hdb/2021.01.04/quote/bid: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/dataaccess/queryorder/hdb/2021.01.04/quote/bid -------------------------------------------------------------------------------- /tests/dataaccess/queryorder/hdb/2021.01.04/quote/bsize: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/dataaccess/queryorder/hdb/2021.01.04/quote/bsize -------------------------------------------------------------------------------- /tests/dataaccess/queryorder/hdb/2021.01.04/quote/ex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/dataaccess/queryorder/hdb/2021.01.04/quote/ex -------------------------------------------------------------------------------- /tests/dataaccess/queryorder/hdb/2021.01.04/quote/mode: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/dataaccess/queryorder/hdb/2021.01.04/quote/mode -------------------------------------------------------------------------------- /tests/dataaccess/queryorder/hdb/2021.01.04/quote/src: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/dataaccess/queryorder/hdb/2021.01.04/quote/src -------------------------------------------------------------------------------- /tests/dataaccess/queryorder/hdb/2021.01.04/quote/sym: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/dataaccess/queryorder/hdb/2021.01.04/quote/sym -------------------------------------------------------------------------------- /tests/dataaccess/queryorder/hdb/2021.01.04/quote/time: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/dataaccess/queryorder/hdb/2021.01.04/quote/time -------------------------------------------------------------------------------- /tests/dataaccess/queryorder/hdb/sym: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/dataaccess/queryorder/hdb/sym -------------------------------------------------------------------------------- /tests/dataaccess/queryorder/inputs/basicsymquery.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | tablename,`xdaily 3 | partitionfilter,() 4 | attributecolumn,`sym 5 | timefilter,enlist(within;`time;2020.12.15D11:42:00.594522000 2020.12.15D14:42:00.594518000) 6 | instrumentfilter,enlist(=;`sym;1#`GOOG) 7 | columns,`sym`time!`sym`time 8 | grouping,() 9 | aggregations,() 10 | filters,() 11 | freeformwhere,() 12 | freeformby,() 13 | freeformcolumn,() 14 | optimisation,1b 15 | proctype,`rdb 16 | tableproperties ,`primarytimecolumn`attributecolumn`instrumentcolumn`timezone`getrollover`getpartitionrange`partfield!`time`sym`sym``.dataaccess.defaultrollover`.dataaccess.defaultpartitionrange` 17 | renamecolumn,()!() 18 | -------------------------------------------------------------------------------- /tests/dataaccess/queryorder/inputs/colsandffcols.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | tablename,`xdaily 3 | partitionfilter,() 4 | attributecolumn,`sym 5 | timefilter,enlist (within;`time;2020.12.16D06:36:40.024076000 2020.12.16D09:36:40.024073000) 6 | instrumentfilter,() 7 | columns,`price`size!`price`size 8 | grouping,() 9 | aggregations,() 10 | filters,() 11 | freeformwhere,() 12 | freeformby,() 13 | freeformcolumn,(enlist `sym)!enlist `sym 14 | optimisation,1b 15 | proctype,`rdb 16 | tableproperties,`primarytimecolumn`attributecolumn`instrumentcolumn`timezone`getrollover`getpartitionrange`partfield!`time`sym`sym``.dataaccess.defaultrollover`.dataaccess.defaultpartitionrange` 17 | renamecolumn,()!() 18 | -------------------------------------------------------------------------------- /tests/dataaccess/queryorder/inputs/colsandffcols1.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | tablename,`xdaily 3 | partitionfilter,() 4 | attributecolumn,`sym 5 | timefilter,enlist (within;`time;2020.12.15D14:06:41.614336000 2020.12.15D17:06:41.614333000) 6 | instrumentfilter,() 7 | columns,`time`side!`time`side 8 | grouping,() 9 | aggregations,() 10 | filters,() 11 | freeformwhere,() 12 | freeformby,() 13 | freeformcolumn,(enlist `ravgprice)!enlist ({avgs};`price) 14 | optimisation,1b 15 | proctype,`rdb 16 | tableproperties,`primarytimecolumn`attributecolumn`instrumentcolumn`timezone`getrollover`getpartitionrange`partfield!`time`sym`sym``.dataaccess.defaultrollover`.dataaccess.defaultpartitionrange` 17 | renamecolumn,()!() 18 | -------------------------------------------------------------------------------- /tests/dataaccess/queryorder/inputs/dictionaryrename.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | tablename,`xdaily 3 | partitionfilter,() 4 | attributecolumn,`sym 5 | timefilter,enlist(within;`time;2020.12.15D11:42:00.594522000 2020.12.15D14:42:00.594518000) 6 | instrumentfilter,enlist(=;`sym;1#`GOOG) 7 | columns,`sym`time!`sym`time 8 | grouping,() 9 | aggregations,() 10 | filters,() 11 | freeformwhere,() 12 | freeformby,() 13 | freeformcolumn,() 14 | optimisation,1b 15 | proctype,`rdb 16 | tableproperties ,`primarytimecolumn`attributecolumn`instrumentcolumn`timezone`getrollover`getpartitionrange`partfield!`time`sym`sym``.dataaccess.defaultrollover`.dataaccess.defaultpartitionrange` 17 | renamecolumn,`sym`time!`new1`new2 18 | -------------------------------------------------------------------------------- /tests/dataaccess/queryorder/inputs/getdatabyclause.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | tablename , `xdaily 3 | starttime , 2000.01.05D00:00:00.000000000 4 | endtime , 2000.01.07D00:00:00.000000000 5 | filters , `bidprice`askprice!(enlist(>;20);enlist(>;25)) 6 | freeformby ,"sv["","";(""sym"";""asksize"")]" 7 | freeformcolumn, "mprice:max askprice" 8 | instruments , `AUSUSD`EURUSD`GBPUSD 9 | -------------------------------------------------------------------------------- /tests/dataaccess/queryorder/inputs/getdatabyclause1.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | tablename , `xdaily 3 | starttime , 2000.01.05D00:00:00.000000000 4 | endtime , 2000.01.07D00:00:00.000000000 5 | filters , `bidprice`askprice!(enlist(>;20);enlist(>;25)) 6 | freeformby ,"sv["","";(""asksize"";""sym"")]" 7 | freeformcolumn, "mprice:max askprice" 8 | instruments , `AUSUSD`EURUSD`GBPUSD 9 | -------------------------------------------------------------------------------- /tests/dataaccess/queryorder/inputs/hdbwherereorder.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | tablename,`quote 3 | partitionfilter,enlist(within;`date;2020.12.17 2020.12.22) 4 | attributecolumn,`sym 5 | timefilter,enlist(within;`time;2020.12.17D10:11:32.897689000 2020.12.22D10:11:32.897688000) 6 | instrumentfilter,enlist (in;`sym;enlist`IBM) 7 | columns,() 8 | grouping,() 9 | aggregations,() 10 | filters,((=;`stop;0);(>;`price;25)) 11 | freeformwhere,() 12 | freeformby,() 13 | freeformcolumn,() 14 | optimisation,1b 15 | proctype,`hdb 16 | tableproperties,`primarytimecolumn`attributecolumn`instrumentcolumn`timezone`getrollover`getpartitionrange`partfield!`time`sym`sym``.dataaccess.defaultrollover`.dataaccess.defaultpartitionrange`date 17 | renamecolumn,()!() 18 | -------------------------------------------------------------------------------- /tests/dataaccess/queryorder/inputs/listrename.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | tablename,`xdaily 3 | partitionfilter,() 4 | attributecolumn,`sym 5 | timefilter,enlist(within;`time;2020.12.15D11:42:00.594522000 2020.12.15D14:42:00.594518000) 6 | instrumentfilter,enlist(=;`sym;1#`GOOG) 7 | columns,`sym`time!`sym`time 8 | grouping,() 9 | aggregations,() 10 | filters,() 11 | freeformwhere,() 12 | freeformby,() 13 | freeformcolumn,() 14 | optimisation,1b 15 | proctype,`rdb 16 | tableproperties ,`primarytimecolumn`attributecolumn`instrumentcolumn`timezone`getrollover`getpartitionrange`partfield!`time`sym`sym``.dataaccess.defaultrollover`.dataaccess.defaultpartitionrange` 17 | renamecolumn,`col1`col2 18 | -------------------------------------------------------------------------------- /tests/dataaccess/queryorder/inputs/multiinstrumentquery.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | tablename,`xdaily 3 | partitionfilter,() 4 | attributecolumn ,`sym 5 | timefilter,enlist (within;`time;2021.01.03D13:12:28.325011000 2021.01.08D13:12:28.325010000) 6 | instrumentfilter,enlist (in;`sym;enlist `GOOG`IBM) 7 | columns,() 8 | grouping,() 9 | aggregations,() 10 | filters,((=;`stop;0);(>;`price;25)) 11 | freeformwhere,() 12 | freeformby,(enlist `sym)!enlist(`sym) 13 | freeformcolumn,(enlist `mprice)!enlist(max;`price) 14 | optimisation,1b 15 | proctype,`rdb 16 | tableproperties,`primarytimecolumn`attributecolumn`instrumentcolumn`timezone`getrollover`getpartitionrange`partfield!`time`sym`sym``.dataaccess.defaultrollover`.dataaccess.defaultpartitionrange` 17 | renamecolumn,()!() 18 | -------------------------------------------------------------------------------- /tests/dataaccess/queryorder/inputs/partederror.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | tablename,`quote 3 | partitionfilter,() 4 | attributecolumn,`sym 5 | timefilter ,enlist (within;`time;2020.12.15D14:43:31.428663000 2020.12.15D17:43:31.428661000) 6 | instrumentfilter,() 7 | columns,() 8 | grouping,(enlist `sym)!enlist `sym 9 | aggregations,() 10 | filters,() 11 | freeformwhere,enlist (=;`sym;enlist `IBM) 12 | freeformby,() 13 | freeformcolumn,(enlist `mprice)!enlist (max;`price) 14 | optimisation,1b 15 | proctype,`hdb 16 | tableproperties,`primarytimecolumn`attributecolumn`instrumentcolumn`timezone`getrollover`getpartitionrange`partfield!`time`sym`sym``.dataaccess.defaultrollover`.dataaccess.defaultpartitionrange` 17 | renamecolumn,()!() 18 | -------------------------------------------------------------------------------- /tests/dataaccess/queryorder/inputs/reorderby.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | tablename,`xdaily 3 | partitionfilter,() 4 | attributecolumn,`sym 5 | timefilter,enlist (within;`time;2020.12.15D13:54:27.901446000 2020.12.15D16:54:27.901442000) 6 | instrumentfilter,() 7 | columns,`price`time!`price`time 8 | grouping,`sym`size!`sym`size 9 | aggregations,() 10 | filters,() 11 | freeformwhere,() 12 | freeformby,() 13 | freeformcolumn,() 14 | optimisation,1b 15 | proctype,`rdb 16 | tableproperties ,`primarytimecolumn`attributecolumn`instrumentcolumn`timezone`getrollover`getpartitionrange`partfield!`time`sym`sym``.dataaccess.defaultrollover`.dataaccess.defaultpartitionrange` 17 | renamecolumn,()!() 18 | -------------------------------------------------------------------------------- /tests/dataaccess/queryorder/inputs/reorderwhere.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | tablename,`xdaily 3 | partitionfilter,() 4 | attributecolumn,`sym 5 | timefilter,enlist (within;`time;2020.12.15D14:28:46.882009000 2020.12.15D17:28:46.882006000) 6 | instrumentfilter,() 7 | columns,() 8 | grouping,(enlist `sym)!enlist `sym 9 | aggregations,() 10 | filters,((>;`size;5);(>;`size;5)) 11 | freeformwhere,() 12 | freeformby,() 13 | freeformcolumn,(enlist `mprice)!enlist `price 14 | optimisation,1b 15 | proctype,`rdb 16 | tableproperties,`primarytimecolumn`attributecolumn`instrumentcolumn`timezone`getrollover`getpartitionrange`partfield!`time`sym`sym``.dataaccess.defaultrollover`.dataaccess.defaultpartitionrange` 17 | renamecolumn,()!() 18 | -------------------------------------------------------------------------------- /tests/dataaccess/queryorder/inputs/reorderwhere1.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | tablename,`xdaily 3 | partitionfilter,() 4 | attributecolumn,`sym 5 | timefilter ,enlist (within;`time;2020.12.15D14:43:31.428663000 2020.12.15D17:43:31.428661000) 6 | instrumentfilter,() 7 | columns,() 8 | grouping,(enlist `sym)!enlist `sym 9 | aggregations,() 10 | filters,() 11 | freeformwhere,enlist (=;`sym;enlist `IBM) 12 | freeformby,() 13 | freeformcolumn,(enlist `mprice)!enlist (max;`price) 14 | optimisation,1b 15 | proctype,`rdb 16 | tableproperties,`primarytimecolumn`attributecolumn`instrumentcolumn`timezone`getrollover`getpartitionrange`partfield!`time`sym`sym``.dataaccess.defaultrollover`.dataaccess.defaultpartitionrange` 17 | renamecolumn,()!() 18 | -------------------------------------------------------------------------------- /tests/dataaccess/queryorder/inputs/timesortedhdb.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | tablename,`quote 3 | partitionfilter,enlist(within;`date;2020.12.17 2020.12.22) 4 | attributecolumn,`sym 5 | timefilter,enlist(within;`time;2020.12.17D10:11:32.897689000 2020.12.22D10:11:32.897688000) 6 | instrumentfilter,enlist (in;`sym;enlist enlist `GOOG) 7 | columns,() 8 | grouping,() 9 | aggregations,() 10 | filters,((=;`stop;0);(>;`price;25)) 11 | freeformwhere,() 12 | freeformby,() 13 | freeformcolumn,() 14 | optimisation,1b 15 | proctype,`hdb 16 | tableproperties,`primarytimecolumn`attributecolumn`instrumentcolumn`timezone`getrollover`getpartitionrange`partfield!`time`sym`sym``.dataaccess.defaultrollover`.dataaccess.defaultpartitionrange`date 17 | renamecolumn,()!() 18 | -------------------------------------------------------------------------------- /tests/dataaccess/queryorder/inputs/unsortedhdb.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | tablename,`quote 3 | partitionfilter,enlist(within;`date;2021.01.02 2021.01.07) 4 | attributecolumn,`sym 5 | timefilter,enlist(within;`time;2021.01.02D12:02:13.444192000 2021.01.07D12:02:13.444192000) 6 | instrumentfilter,enlist(in;`sym;1#`GOOG) 7 | columns,() 8 | grouping,() 9 | aggregations,() 10 | filters,((=;`stop;0);(>;`price;25)) 11 | freeformwhere,() 12 | freeformby,() 13 | freeformcolumn,() 14 | optimisation,1b 15 | proctype,`hdb 16 | tableproperties,`primarytimecolumn`attributecolumn`instrumentcolumn`timezone`getrollover`getpartitionrange`partfield!`time`sym`sym``.dataaccess.defaultrollover`.dataaccess.defaultpartitionrange`date 17 | renamecolumn,()!() 18 | -------------------------------------------------------------------------------- /tests/dataaccess/queryorder/outputs/basicsymquery.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | 0,`xdaily 3 | 1,((=;`sym;enlist `GOOG);(within;`time;2020.12.15D11:42:00.594522000 2020.12.15D14:42:00.594518000)) 4 | 2,0b 5 | 3,`sym`time!`sym`time 6 | -------------------------------------------------------------------------------- /tests/dataaccess/queryorder/outputs/byandffby.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | 0,`xdaily 3 | 1,enlist (within;`time;2020.12.16D08:26:44.894295000 2020.12.16D11:26:44.894291000) 4 | 2,`sym`side!`sym`side 5 | 3,(enlist `mprice)!enlist (max;`price) 6 | -------------------------------------------------------------------------------- /tests/dataaccess/queryorder/outputs/colsandffcols.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | 0,`xdaily 3 | 1,enlist (within;`time;2020.12.16D06:36:40.024076000 2020.12.16D09:36:40.024073000) 4 | 2,0b 5 | 3,`price`size`sym!`price`size`sym 6 | 7 | -------------------------------------------------------------------------------- /tests/dataaccess/queryorder/outputs/colsandffcols1.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | 0,`xdaily 3 | 1,enlist (within;`time;2020.12.15D14:06:41.614336000 2020.12.15D17:06:41.614333000) 4 | 2,0b 5 | 3,`time`side`ravgprice!(`time;`side;({avgs};`price)) 6 | -------------------------------------------------------------------------------- /tests/dataaccess/queryorder/outputs/dictionaryrename.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | 0,`xdaily 3 | 1,((=;`sym;enlist`GOOG);(within;`time;2020.12.15D11:42:00.594522000 2020.12.15D14:42:00.594518000)) 4 | 2,0b 5 | 3,`sym`time!`sym`time 6 | 7 | -------------------------------------------------------------------------------- /tests/dataaccess/queryorder/outputs/hdbwherereorder.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | 0,`quote 3 | 1,((within;`date;2020.12.17 2020.12.22);(in;`sym;enlist`IBM);(within;`time;)2020.12.17D10:11:32.897689000 2020.12.22D10:11:32.897688000;(=;`stop;0);(>;`price;25)) 4 | 2,0b 5 | 3,() 6 | -------------------------------------------------------------------------------- /tests/dataaccess/queryorder/outputs/listrename.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | 0,`xdaily 3 | 1,((=;`sym;enlist `GOOG);(within;`time;2020.12.15D11:42:00.594522000 2020.12.15D14:42:00.594518000)) 4 | 2,0b 5 | 3,`sym`time!`sym`time 6 | 7 | -------------------------------------------------------------------------------- /tests/dataaccess/queryorder/outputs/multiinstrumentquery0.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | 0,`xdaily 3 | 1,((=;`sym;1#`GOOG);(within;`time;2021.01.03D13:12:28.325011000 2021.01.08D13:12:28.325010000);(=;`stop;0);(>;`price;25)) 4 | 2,(enlist `sym)!enlist(`sym) 5 | 3,(enlist `mprice )!enlist(max;`price) 6 | 7 | -------------------------------------------------------------------------------- /tests/dataaccess/queryorder/outputs/multiinstrumentquery1.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | 0,`xdaily 3 | 1,((=;`sym;1#`IBM);(within;`time;2021.01.03D13:12:28.325011000 2021.01.08D13:12:28.325010000);(=;`stop;0);(>;`price;25)) 4 | 2,(enlist `sym)! enlist `sym 5 | 3,(enlist`mprice)!enlist(max;`price) 6 | 7 | -------------------------------------------------------------------------------- /tests/dataaccess/queryorder/outputs/reorderby.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | 0,`xdaily 3 | 1,enlist (within;`time;2020.12.15D13:54:27.901446000 2020.12.15D16:54:27.901442000) 4 | 2,`sym`size!`sym`size 5 | 3,`price`time!`price`time 6 | -------------------------------------------------------------------------------- /tests/dataaccess/queryorder/outputs/reorderwhere.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | 0,`xdaily 3 | 1,((within;`time;2020.12.15D14:28:46.882009000 2020.12.15D17:28:46.882006000);(>;`size;5);(>;`size;5)) 4 | 2,(enlist `sym)!enlist `sym 5 | 3,(enlist `mprice)!enlist `price 6 | -------------------------------------------------------------------------------- /tests/dataaccess/queryorder/outputs/reorderwhere1.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | 0,`xdaily 3 | 1,((=;`sym;enlist `IBM);(within;`time;2020.12.15D14:43:31.428663000 2020.12.15D17:43:31.428661000)) 4 | 2,(enlist `sym)!enlist `sym 5 | 3,(enlist `mprice)!enlist (max;`price) 6 | 7 | -------------------------------------------------------------------------------- /tests/dataaccess/queryorder/outputs/timesortedhdb.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | 0,`quote 3 | 1,((within;`date;2020.12.17 2020.12.22);(in;`sym;enlist enlist`GOOG);(within;`time;)2020.12.17D10:11:32.897689000 2020.12.22D10:11:32.897688000;(=;`stop;0);(>;`price;25)) 4 | 2,0b 5 | 3,() 6 | -------------------------------------------------------------------------------- /tests/dataaccess/queryorder/outputs/unsortedhdb.csv: -------------------------------------------------------------------------------- 1 | parameter,parametervalue 2 | 0,`quote 3 | 1,((within;`date;2021.01.02 2021.01.07);(in;`sym;1#`GOOG);(within;`time;2021.01.02D12:02:13.444192000 2021.01.07D12:02:13.444192000);(=;`stop;0);(>;`price;25)) 4 | 2,0b 5 | 3,() 6 | -------------------------------------------------------------------------------- /tests/dataaccess/queryorder/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Handle command-line arguments 4 | source $KDBTESTS/flagparse.sh 5 | 6 | # Path to query order test directory 7 | testpath=${KDBTESTS}/dataaccess/queryorder 8 | 9 | .${TORQHOME}/torq.sh start all 10 | 11 | # Start test proc 12 | /usr/bin/rlwrap q ${TORQHOME}/torq.q \ 13 | -proctype rdb -procname dailyrdb1 \ 14 | -test ${testpath} \ 15 | -load ${KDBTESTS}/helperfunctions.q ${testpath}/../settings.q ${testpath}/settings.q ${testpath}/../mockdata.q \ 16 | -testresults ${KDBTESTS}/dataaccess/results/ \ 17 | -runtime $run \ 18 | -procfile ${testpath}/config/process.csv \ 19 | -dataaccess ${testpath}/config/tableproperties.csv \ 20 | $debug $stop $write $quiet 21 | -------------------------------------------------------------------------------- /tests/dataaccess/settings.q: -------------------------------------------------------------------------------- 1 | .servers.USERPASS:`$"admin:admin"; 2 | 3 | //- some custom functionality for tests 4 | .dataaccess.testfuncrollover:{[]2000.01.05D}; //- function to determine rollover to split the time ranges destined for the rdb and hdb. 5 | .dataaccess.testfuncpartitionrange:{[timecolumn;primarytimecolumn;partitionfield;hdbtimerange]@[partitionfield$hdbtimerange;1;+;not timecolumn~primarytimecolumn]}; //- offset times for non-primary time columns 6 | -------------------------------------------------------------------------------- /tests/dqe/anomalychk.csv: -------------------------------------------------------------------------------- 1 | action,ms,bytes,lang,code,repeat,minver,comment 2 | comment,0,0,q,Start of tests for infinitychk function,1,,"comment" 3 | before,0,0,q,"t:([] bid: (10 ? 0w) , 90 ? 10; ask: 100 ? 10)",1,,"create table for test" 4 | true,0,0,q,first .dqc.infinitychk[t;`bid`ask;15 15],1,,"Check for true result" 5 | true,0,0,q,not first .dqc.infinitychk[t;`bid`ask;5 5],1,,"Check for false result" 6 | true,0,0,q,not first .dqc.infinitychk[t;`bid`ask;5 15],1,,"Check for false result" 7 | true,0,0,q,not first .dqc.infinitychk[t;`bid`ask;15 5],1,,"Check for false result" 8 | after,0,0,q,delete t from `.,1,,"delete test table" 9 | -------------------------------------------------------------------------------- /tests/dqe/attrcheck.csv: -------------------------------------------------------------------------------- 1 | action,ms,bytes,lang,code,repeat,minver,comment 2 | comment,0,0,q,Start of tests for attrcheck function,1,,"comment" 3 | before,0,0,q,t:([]`s#id:til 7;`p#sym:`A`A`A`B`B`C`C),1,,"create table for test" 4 | true,0,0,q,first .dqc.attrcheck[t;`s`p;`id`sym],1,,"Check for true result" 5 | true,0,0,q,first .dqc.attrcheck[t;`s;`id],1,,"Check for true result" 6 | true,0,0,q,first .dqc.attrcheck[t;`p;`sym],1,,"Check for true result" 7 | true,0,0,q,not first .dqc.attrcheck[t;`g;`sym],1,,"Check for false result" 8 | after,0,0,q,delete t from `.,1,,"delete t from table" 9 | -------------------------------------------------------------------------------- /tests/dqe/beforerun.csv: -------------------------------------------------------------------------------- 1 | action,ms,bytes,lang,code,repeat,minver,comment 2 | comment,0,0,q,,1,,Start of dqe unit tests 3 | beforeany,0,0,q,.dqe.testing:1b,1,,"Set testing variable to true" 4 | beforeany,0,0,q,".proc.loadf[getenv[`KDBCODE],""/processes/dqc.q""]",1,,"Load dqc.q script" 5 | beforeany,0,0,q,".proc.loadf[getenv[`KDBCODE],""/dqcommon/connection.q""]",1,,"Load connection.q script" 6 | -------------------------------------------------------------------------------- /tests/dqe/dupchktab: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/dqe/dupchktab -------------------------------------------------------------------------------- /tests/dqe/freeform.csv: -------------------------------------------------------------------------------- 1 | action,ms,bytes,lang,code,repeat,minver,comment 2 | comment,0,0,q,Start of tests for freeform function,1,,"comment" 3 | true,0,0,q,first .dqc.freeform["select from trade"],1,,"Check for true result" 4 | true,0,0,q,not first .dqc.freeform[`select],1,,"Check for false result" 5 | -------------------------------------------------------------------------------- /tests/dqe/memoryusage.csv: -------------------------------------------------------------------------------- 1 | action,ms,bytes,lang,code,repeat,minver,comment 2 | comment,0,0,q,Start of tests for memoryusage function,1,,"comment" 3 | true,0,0,q,first .dqc.memoryusage[.001],1,,"Check for true result" 4 | true,0,0,q,not first .dqc.memoryusage[1.5],1,,"Check for false result" 5 | -------------------------------------------------------------------------------- /tests/dqe/nullchk.csv: -------------------------------------------------------------------------------- 1 | action,ms,bytes,lang,code,repeat,minver,comment 2 | comment,0,0,q,Start of tests for nullchk function,1,,"comment" 3 | before,0,0,q,tt: ([] bid:100?10;ask:100?10),1,,"create table for true test" 4 | before,0,0,q,"ft:([] bid:(10#0N),90?10;ask:100?10)",1,,"create table for false test" 5 | true,0,0,q,first .dqc.nullchk[`tt;`bid`ask;1 1],1,,"Check for true result" 6 | true,0,0,q,not first .dqc.nullchk[`ft;`bid`ask;1 1],1,,"Check for false result" 7 | after,0,0,q,"delete tt,ft from `.",1,,"delete both test tables" 8 | -------------------------------------------------------------------------------- /tests/dqe/refdatacheck.csv: -------------------------------------------------------------------------------- 1 | action,ms,bytes,lang,code,repeat,minver,comment 2 | comment,0,0,q,Start of tests for refdatacheck function,1,,"comment" 3 | before,0,0,q,truetab:([]id:1000?10;sym:1000?`3),1,,"create table for true test" 4 | before,0,0,q,falsetab:([]id:1000?100;sym:1000?`3),1,,"create table for false test" 5 | before,0,0,q,reftab:([]id:til 10;sym:10?`3),1,,"create table for check" 6 | true,0,0,q,first .dqc.refdatacheck[truetab;reftab;`id;`id],1,,"Check for true result" 7 | true,0,0,q,not first .dqc.refdatacheck[falsetab;reftab;`id;`id],1,,"Check for false result" 8 | after,0,0,q,"delete truetab,falsetab,reftab from `.",1,,"delete test tables" 9 | -------------------------------------------------------------------------------- /tests/dqe/tablecount.csv: -------------------------------------------------------------------------------- 1 | action,ms,bytes,lang,code,repeat,minver,comment 2 | comment,0,0,q,Start of tests for tablecount function,1,,"comment" 3 | before,0,0,q,tab:([]id:til 5;name:1_5{5?.Q.a}\0),1,,"create table for test" 4 | true,0,0,q,first .dqc.tablecount[`tab;=;5],1,,"Check for true result" 5 | true,0,0,q,not first .dqc.tablecount[`tab;>;10],1,,"Check for false result" 6 | true,0,0,q,first .dqc.tablecount[`tab;<;10],1,,"Check for true result" 7 | true,0,0,q,first .dqc.tablehasrecords[`tab],1,,"test projection of function" 8 | after,0,0,q,delete tab from `.,1,,"delete tab table" 9 | -------------------------------------------------------------------------------- /tests/dqe/tableticking.csv: -------------------------------------------------------------------------------- 1 | action,ms,bytes,lang,code,repeat,minver,comment 2 | before,0,0,q,trade:([]time:(.z.p-"u"$8)+"u"$til 5;sym:`AAPL`AAPL`DOW`GOOG`DOW;price:51.33 11.34 30.02 10.87 25.37;size:40 42 38 29 54;stop:00000b;cond:"JNJON";ex:"ONNON"),1,,"Set up trade table" 3 | true,0,0,q,first .dqc.tableticking[`trade;`5;`minute],1,,"Test if trade table ticked for last 5 minutes" 4 | true,0,0,q,first .dqc.tableticking[`trade;`320;`second],1,,"Test if trade table ticked for last 320 seconds" 5 | fail,0,0,q,.dqc.tableticking[`trade`quote;`5;`minute],1,,"Test for fail because of too many tables passed" 6 | after,0,0,q,delete trade from `.,1,,,"Delete trade table" 7 | -------------------------------------------------------------------------------- /tests/dqe/xmarketalert.csv: -------------------------------------------------------------------------------- 1 | action,ms,bytes,lang,code,repeat,minver,comment 2 | comment,0,0,q,Start of tests for xmarketalert function,1,,"comment" 3 | before,0,0,q,truetab:([]id:til 5;"f"$bid:1.5+til 5;"f"$ask:2+til 5),1,,"create table for true test" 4 | before,0,0,q,falsetab:([]id:til 5;"f"$bid:2.5+til 5;"f"$ask:2+til 5),1,,"create table for false test" 5 | true,0,0,q,first .dqc.xmarketalert[truetab],1,,"Check for true result" 6 | true,0,0,q,not first .dqc.xmarketalert[falsetab],1,,"Check for false result" 7 | after,0,0,q,"delete truetab,falsetab from `.",1,,"delete both test tables" 8 | -------------------------------------------------------------------------------- /tests/k4unit/startupcycles/run_startupcycles.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ${TORQHOME}/torq.sh start discovery1 4 | ${TORQHOME}/torq.sh start stp1 5 | 6 | #own 7 | ${QCMD} ${TORQHOME}/torq.q \ 8 | -proctype rdb -procname rdb1 \ 9 | -test ${KDBTESTS}/k4unit/startupcycles/ \ 10 | -load ${KDBCODE}/processes/rdb.q \ 11 | -testresults ${KDBTESTS}/k4unit/logs/ \ 12 | -runtime $run \ 13 | $debug $stop $write $quiet 14 | 15 | ${TORQHOME}/torq.sh stop all 16 | -------------------------------------------------------------------------------- /tests/k4unit/startupcycles/startupcycles.csv: -------------------------------------------------------------------------------- 1 | action,ms,bytes,lang,code,repeat,minver,comment 2 | fail,0,0,q,.servers.startupdepcycles[`feed1;1;1],1,,"test startupdepcycles" -------------------------------------------------------------------------------- /tests/k4unit/tests.csv: -------------------------------------------------------------------------------- 1 | action,ms,bytes,lang,code,repeat,minver,comment 2 | true,0,0,q,"(""a,b"")~"",""sv 1#'""ab""",,,test quote escaping 3 | -------------------------------------------------------------------------------- /tests/merge/tplogreplay/process.csv: -------------------------------------------------------------------------------- 1 | host,port,proctype,procname,U,localtime,g,T,w,load,startwithall,extras,qcmd 2 | localhost,{KDBBASEPORT}+101,discovery,discovery1,${TORQAPPHOME}/appconfig/passwords/accesslist.txt,1,0,,,${KDBCODE}/processes/discovery.q,1,, 3 | localhost,{KDBBASEPORT}+103,hdb,hdb1,${TORQAPPHOME}/appconfig/passwords/accesslist.txt,1,1,60,4000,${KDBTESTS}/merge/tplogreplay/testhdb,1,, 4 | -------------------------------------------------------------------------------- /tests/merge/tplogreplay/sort.csv: -------------------------------------------------------------------------------- 1 | tabname,att,column,sort 2 | default,p,sym,1 3 | default,,time,1 4 | xdailyt,p,sym,1 5 | xdailyt,,time,1 6 | xdailyq,p,sym,1 7 | xdailyq,,time,1 8 | -------------------------------------------------------------------------------- /tests/merge/tplogreplay/testlogs/stp1_logmsg20220616122504: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/merge/tplogreplay/testlogs/stp1_logmsg20220616122504 -------------------------------------------------------------------------------- /tests/merge/tplogreplay/testlogs/stp1_packets20220616122504: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/merge/tplogreplay/testlogs/stp1_packets20220616122504 -------------------------------------------------------------------------------- /tests/merge/tplogreplay/testlogs/stp1_quote20220616122504: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/merge/tplogreplay/testlogs/stp1_quote20220616122504 -------------------------------------------------------------------------------- /tests/merge/tplogreplay/testlogs/stp1_quote_iex20220616122504: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/merge/tplogreplay/testlogs/stp1_quote_iex20220616122504 -------------------------------------------------------------------------------- /tests/merge/tplogreplay/testlogs/stp1_segmentederrorlogfile20220616122504: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/merge/tplogreplay/testlogs/stp1_segmentederrorlogfile20220616122504 -------------------------------------------------------------------------------- /tests/merge/tplogreplay/testlogs/stp1_trade20220616122504: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/merge/tplogreplay/testlogs/stp1_trade20220616122504 -------------------------------------------------------------------------------- /tests/merge/tplogreplay/testlogs/stp1_trade_iex20220616122504: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/merge/tplogreplay/testlogs/stp1_trade_iex20220616122504 -------------------------------------------------------------------------------- /tests/merge/tplogreplay/testlogs/stpmeta: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/merge/tplogreplay/testlogs/stpmeta -------------------------------------------------------------------------------- /tests/merge/tplogreplay/tpreplaysettings.q: -------------------------------------------------------------------------------- 1 | // config settings 2 | \d .replay 3 | partandmerge:1b //setting to do a replay where the data is partitioned and then merged on disk 4 | tempdir:hsym`$getenv[`KDBTESTS],"/merge/tplogreplay/tempmergedir"; 5 | exitwhencomplete:1b 6 | autoreplay:1b 7 | sortcsv:hsym`$getenv[`KDBTESTS],"/merge/tplogreplay/sort.csv" 8 | //merge limits controlled by values set it config 9 | -------------------------------------------------------------------------------- /tests/merge/wdb/config/sort.csv: -------------------------------------------------------------------------------- 1 | tabname,att,column,sort 2 | default,p,sym,1 3 | default,,time,1 4 | xdailyt,p,sym,1 5 | xdailyt,,time,1 6 | xdailyq,p,sym,1 7 | xdailyq,,time,1 8 | -------------------------------------------------------------------------------- /tests/merge/wdb/config/wdbsettings.q: -------------------------------------------------------------------------------- 1 | //variables needed to configure wdb to merge and save data to our test directories 2 | .wdb.writedownmode:`partbyattr; 3 | .wdb.sortcsv:hsym`$getenv[`KDBTESTS],"/merge/wdb/config/sort.csv"; 4 | .wdb.hdbdir:hsym`$getenv[`KDBTESTS],"/merge/wdb/testhdb"; 5 | .wdb.savedir:hsym`$getenv[`KDBTESTS],"/merge/wdb/testwdbhdb"; 6 | .wdb.hdbsettings:(`compression`hdbdir)!(();.wdb.hdbdir); 7 | //this variable will set the merge limit to 30000 for the xdaily table, in mockdata script have configured mock data so there will be a partition less than, equal to and greater than that limiy 8 | .wdb.mergenumbytes:300000; 9 | -------------------------------------------------------------------------------- /tests/merge/wdb/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Handle command-line arguments 4 | source $KDBTESTS/flagparse.sh 5 | 6 | # Path to test directory 7 | testpath=${KDBTESTS}/merge/wdb 8 | 9 | mkdir ${testpath}/testhdb 10 | 11 | # Start procs 12 | ${TORQHOME}/torq.sh start all -csv ${testpath}/config/process.csv 13 | 14 | # Start test proc 15 | ${RLWRAP} ${QCMD} ${TORQHOME}/torq.q \ 16 | -proctype test -procname test1 \ 17 | -load ${KDBTESTS}/helperfunctions.q ${testpath}/settings.q ${testpath}/mockdata.q \ 18 | -test ${testpath}/tests \ 19 | -testresults ${KDBTESTS}/merge/wdb/results/ \ 20 | -runtime $run \ 21 | -procfile ${testpath}/config/process.csv \ 22 | $debug $stop $write $quiet 23 | 24 | # Shut down procs 25 | ${TORQHOME}/torq.sh stop all -csv ${testpath}/config/process.csv 26 | -------------------------------------------------------------------------------- /tests/merge/wdb/settings.q: -------------------------------------------------------------------------------- 1 | // IPC connection parameters 2 | .servers.CONNECTIONS:`discovery`segmentedtickerplant`hdb`wdb`sort`sortworker; 3 | .servers.USERPASS:`admin:admin; 4 | -------------------------------------------------------------------------------- /tests/merge/wdb/xdaily.q: -------------------------------------------------------------------------------- 1 | xdailyq:([]time:`timestamp$(); sym:`g#`symbol$(); bid:`float$(); ask:`float$(); bsize:`long$(); asize:`long$(); mode:`char$(); ex:`char$(); src:`symbol$()) 2 | xdailyt:([]time:`timestamp$(); sym:`g#`symbol$(); price:`float$(); size:`int$(); stop:`boolean$(); cond:`char$(); ex:`char$();side:`symbol$()) 3 | -------------------------------------------------------------------------------- /tests/order.txt: -------------------------------------------------------------------------------- 1 | k4unit.q 2 | runtests.q 3 | -------------------------------------------------------------------------------- /tests/pcap/dummy.pcap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/pcap/dummy.pcap -------------------------------------------------------------------------------- /tests/pcap/dummyfilealerter.csv: -------------------------------------------------------------------------------- 1 | path,match,function,newonly,movetodirectory 2 | {KDBTESTS}/pcap,*.pcap,sendpackets,1, 3 | -------------------------------------------------------------------------------- /tests/pcap/dummypacketstable: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/pcap/dummypacketstable -------------------------------------------------------------------------------- /tests/pcap/dummyquotetable: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/pcap/dummyquotetable -------------------------------------------------------------------------------- /tests/pcap/runpcaptests.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ./torq.sh start discovery1 4 | ./torq.sh start tickerplant1 5 | ./torq.sh start rdb1 -extras -.rdb.replaylog 0 6 | rlwrap q torq.q -load ${KDBCODE}/processes/filealerter.q -proctype filealerter -procname filealerter1 -test ${KDBTESTS}/pcap -debug -.fa.polltime 00:10 -.servers.CONNECTIONS -.fa.tickerplanttype -.fa.alreadyprocessed ${KDBTESTS}/pcap/filealerterprocessed -.fa.inputcsv ${KDBTESTS}/pcap/dummyfilealerter.csv 7 | ./torq.sh stop all 8 | -------------------------------------------------------------------------------- /tests/performance/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Get localpath 4 | localpath=$KDBTESTS/performance 5 | 6 | # Start procs 7 | ${TORQHOME}/torq.sh start discovery1 feed1 stp1 tp1 consumer1 tick1 -csv ${localpath}/settings/process.csv 8 | 9 | # Start test proc 10 | /usr/bin/rlwrap q ${TORQHOME}/torq.q \ 11 | -proctype observer -procname observer1 \ 12 | -load ${localpath}/settings/observer.q ${localpath}/code/observer.q \ 13 | -procfile ${localpath}/settings/process.csv \ 14 | -debug 15 | 16 | # Shut down procs 17 | ${TORQHOME}/torq.sh stop discovery1 feed1 stp1 tp1 consumer1 tick1 -csv ${localpath}/settings/process.csv 18 | -------------------------------------------------------------------------------- /tests/performance/settings/consumer.q: -------------------------------------------------------------------------------- 1 | // Settings file for consumer process 2 | 3 | // Server settings 4 | .servers.enabled:1b; 5 | .servers.CONNECTIONS:`tickerplant`segmentedtickerplant`feed`tick; 6 | .servers.USERPASS:`admin:admin; 7 | 8 | // Process settings 9 | .consumer.singlecols:`time`batch`mode`feedtime; 10 | .consumer.bulkcols:`time`sym`price`size`src`ex`cond`mode1`side`batch`mode`feedtime; 11 | .consumer.whereclause:((=;`mode;enlist `single);(=;`mode;enlist `bulk)); 12 | 13 | // Results table schema 14 | .consumer.results:flip `batching`pubmode`time`feedtime`consumertime`feedtotp`tptoconsumer`feedtoconsumer!"SSPPPNNN" $\: (); -------------------------------------------------------------------------------- /tests/performance/settings/database.q: -------------------------------------------------------------------------------- 1 | singleupd:flip `time`sym`mode`feedtime!"PSSP" $\: (); 2 | updates:update `g#sym from flip `time`sym`price`size`src`ex`cond`mode1`side`batch`mode`feedtime!"PSFJSBCCSSSP" $\: (); -------------------------------------------------------------------------------- /tests/performance/settings/feed.q: -------------------------------------------------------------------------------- 1 | // Server settings 2 | .servers.enabled:1b; 3 | .servers.CONNECTIONS:`tickerplant`segmentedtickerplant`observer`tick; 4 | .servers.USERPASS:`admin:admin; 5 | .servers.HOPENTIMEOUT:30000; 6 | 7 | // Feed parameters 8 | .feed.sym:`AMD`AIG`AAPL`DELL`DOW`GOOG`HPQ`INTL`IBM`MSFT; 9 | .feed.mode:" ABHILNORYZ"; 10 | .feed.cond:" 89ABCEGJKLNOPRTWZ"; 11 | .feed.ex:10b; 12 | .feed.src:`BARX`GETGO`SUN`DB; 13 | .feed.side:`buy`sell; 14 | .feed.maxprice:100.0; 15 | .feed.maxsize:50; 16 | .feed.looptime:00:01:00; 17 | 18 | // Create bulk update 19 | .feed.bulk:.feed.bulkrows ?' .feed[`sym`maxprice`maxsize`src`ex`cond`mode`side]; -------------------------------------------------------------------------------- /tests/performance/settings/testdb.q: -------------------------------------------------------------------------------- 1 | singleupd:flip `time`sym`mode`feedtime!"PSSP" $\: (); 2 | updates:update `g#sym from flip `time`sym`price`size`src`ex`cond`mode1`side`batch`mode`feedtime!"PSFJSBCCSSSP" $\: (); -------------------------------------------------------------------------------- /tests/performance/settings/u.q: -------------------------------------------------------------------------------- 1 | // Kx u namespace 2 | 3 | \d .u 4 | init:{w::t!(count t::tables`.)#()} 5 | 6 | del:{w[x]_:w[x;;0]?y}; 7 | .dotz.set[`.z.pc;{del[;x]each t}]; 8 | 9 | sel:{$[`~y;x;select from x where sym in y]} 10 | 11 | pub:{[t;x]{[t;x;w]if[count x:sel[x]w 1;(neg first w)(`upd;t;x)]}[t;x]each w t} 12 | 13 | add:{$[(count w x)>i:w[x;;0]?.z.w;.[`.u.w;(x;i;1);union;y];w[x],:enlist(.z.w;y)];(x;$[99=type v:value x;sel[v]y;@[0#v;`sym;`g#]])} 14 | 15 | sub:{if[x~`;:sub[;y]each t];if[not x in t;'x];del[x].z.w;add[x;y]} 16 | 17 | end:{(neg union/[w[;;0]])@\:(`.u.end;x)} -------------------------------------------------------------------------------- /tests/rdb/rdbsub.csv: -------------------------------------------------------------------------------- 1 | tabname,filts,columns 2 | trade,sym=`GOOG, 3 | quote,bid>50.0, 4 | -------------------------------------------------------------------------------- /tests/rdb/runrdbtests.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ./torq.sh start discovery1 4 | ./torq.sh start stp1 5 | ./torq.sh start feed1 6 | /usr/bin/rlwrap q torq.q -load ${KDBCODE}/processes/rdb.q -proctype rdb -procname rdb1 -test ${KDBTESTS}/rdb -debug 7 | ./torq.sh stop all 8 | -------------------------------------------------------------------------------- /tests/rdbsub.csv: -------------------------------------------------------------------------------- 1 | tabname,filters,columns 2 | trade,"sym=`GOOG", 3 | quote,"bid>50.0", 4 | -------------------------------------------------------------------------------- /tests/schemas/insertdata.q: -------------------------------------------------------------------------------- 1 | stpHandle:gethandle[`stp1] 2 | wdbHandle:gethandle[`wdb1] 3 | testtrade:((5#`GOOG),5?`4;10?100.0;10?100i;10#0b;10?.Q.A;10?.Q.A;10#`buy) 4 | testquote:(10?`4;(5?50.0),50+5?50.0;10?100.0;10?100i;10?100i;10?.Q.A;10?.Q.A;10#`3) 5 | stpHandle @/: `.u.upd ,/: ((`trade;testtrade);(`quote;testquote)) 6 | wdbHandle(`.u.end;`.wdb.currentpartition) 7 | exit 0 8 | -------------------------------------------------------------------------------- /tests/schemas/process.csv: -------------------------------------------------------------------------------- 1 | host,port,proctype,procname,U,localtime,g,T,w,load,startwithall,extras,qcmd 2 | localhost,{KDBBASEPORT}+100,discovery,discovery1,,1,0,,,${KDBCODE}/processes/discovery.q,1,,q 3 | localhost,{KDBBASEPORT}+101,segmentedtickerplant,stp1,,1,0,,,${KDBCODE}/processes/segmentedtickerplant.q,1,-schemafile ${TORQHOME}/database.q,q 4 | localhost,{KDBBASEPORT}+103,rdb,rdb1,,1,1,180,,${KDBCODE}/processes/rdb.q,1,,q 5 | localhost,{KDBBASEPORT}+104,hdb,hdb1,,1,1,180,,${TORQHOME}/hdb,1,,q 6 | localhost,{KDBBASEPORT}+105,wdb,wdb1,,1,1,180,,${KDBCODE}/processes/wdb.q,1,,q -------------------------------------------------------------------------------- /tests/schemas/settings.q: -------------------------------------------------------------------------------- 1 | .servers.CONNECTIONS:`wdb`segmentedtickerplant`hdb`idb`gateway`rdb 2 | .servers.startup[]; 3 | 4 | hdbdir: `$getenv[`TORQHOME],"/wdbhdb/" -------------------------------------------------------------------------------- /tests/stp/TestCases.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/TestCases.csv -------------------------------------------------------------------------------- /tests/stp/batching/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Handle command-line arguments 4 | source $KDBTESTS/flagparse.sh 5 | 6 | # Path to test directory 7 | testpath=${KDBTESTS}/stp/batching 8 | 9 | # Start up procs 10 | ${TORQHOME}/torq.sh start discovery1 stp1 rdb1 11 | 12 | # Start up test proc 13 | /usr/bin/rlwrap q ${TORQHOME}/torq.q \ 14 | -proctype test -procname test1 \ 15 | -schemafile ${TORQHOME}/database.q \ 16 | -test ${testpath} \ 17 | -load ${KDBTESTS}/helperfunctions.q ${testpath}/settings.q \ 18 | -testresults ${KDBTESTS}/stp/results/ \ 19 | -runtime $run \ 20 | $debug $stop $write $quiet 21 | 22 | # Close other procs 23 | ${TORQHOME}/torq.sh stop discovery1 stp1 rdb1 -------------------------------------------------------------------------------- /tests/stp/batching/settings.q: -------------------------------------------------------------------------------- 1 | // IPC connection parameters 2 | .servers.CONNECTIONS:`rdb`segmentedtickerplant; 3 | .servers.USERPASS:`admin:admin; 4 | 5 | // Test trade batches 6 | batch1:(10?`4;10?100.0;10?100i;10#0b;10?.Q.A;10?.Q.A;10#`buy); 7 | batch2:(1?`4;1?100.0;1?100i;1#0b;1?.Q.A;1?.Q.A;1#`buy); 8 | 9 | // Local trade table schema 10 | trade:flip `time`sym`price`size`stop`cond`ex`side!"PSFIBCCS" $\: (); 11 | 12 | // Local upd function 13 | upd:{[t;x] t insert x}; -------------------------------------------------------------------------------- /tests/stp/chainedeod/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Handle command-line arguments 4 | source $KDBTESTS/flagparse.sh 5 | 6 | # Path to test directory 7 | testpath=${KDBTESTS}/stp/chainedeod 8 | 9 | # Start procs 10 | ${TORQHOME}/torq.sh start discovery1 stptest1 sctptest1 rdb1 -csv ${testpath}/process.csv 11 | 12 | # Start test proc 13 | /usr/bin/rlwrap q ${TORQHOME}/torq.q \ 14 | -proctype test -procname test1 \ 15 | -test ${testpath} \ 16 | -load ${KDBTESTS}/helperfunctions.q ${testpath}/settings.q \ 17 | -results ${KDBTESTS}/stp/results/ \ 18 | -procfile ${testpath}/process.csv \ 19 | -runtime $run \ 20 | $debug $stop $quiet 21 | 22 | # Shut down procs 23 | ${TORQHOME}/torq.sh stop discovery1 stptest1 sctptest1 rdb1 -csv ${testpath}/process.csv 24 | -------------------------------------------------------------------------------- /tests/stp/chainedeod/settings.q: -------------------------------------------------------------------------------- 1 | // IPC connection parameters 2 | .servers.CONNECTIONS:`rdb`segmentedtickerplant`segmentedchainedtickerplant; 3 | .servers.USERPASS:`admin:admin; 4 | 5 | // Paths to process CSV and test STP log directory 6 | processcsv:getenv[`KDBTESTS],"/stp/chainedeod/process.csv"; 7 | tplogdir:getenv[`KDBTPLOG]; 8 | 9 | // Count number of tplog dirs for a given proc 10 | // eg counttplogs[`sctptest1] 11 | counttplogs:{[procname;tplogdir] 12 | sum system["ls ",tplogdir] like string[procname],"*" 13 | }[;tplogdir]; 14 | 15 | // Function projections (using functions from helperfunctions.q) 16 | startproc:startorstopproc["start";;processcsv]; 17 | stopproc:startorstopproc["stop";;processcsv]; 18 | 19 | // Flag to save tests to disk 20 | .k4.savetodisk:1b; 21 | -------------------------------------------------------------------------------- /tests/stp/chainedeodlognone/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Handle command-line arguments 4 | source $KDBTESTS/flagparse.sh 5 | 6 | # Path to test directory 7 | testpath=${KDBTESTS}/stp/chainedeodlognone 8 | 9 | # Start procs 10 | ${TORQHOME}/torq.sh start discovery1 stptest1 sctptest1 rdb1 -csv ${testpath}/process.csv 11 | 12 | # Start test proc 13 | /usr/bin/rlwrap q ${TORQHOME}/torq.q \ 14 | -proctype test -procname test1 \ 15 | -test ${testpath} \ 16 | -load ${KDBTESTS}/helperfunctions.q ${testpath}/settings.q \ 17 | -results ${KDBTESTS}/stp/results/ \ 18 | -procfile ${testpath}/process.csv \ 19 | -runtime $run \ 20 | $debug $stop $quiet 21 | 22 | # Shut down procs 23 | ${TORQHOME}/torq.sh stop discovery1 stptest1 sctptest1 rdb1 -csv ${testpath}/process.csv 24 | -------------------------------------------------------------------------------- /tests/stp/chainedlogmodes/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Handle command-line arguments 4 | source $KDBTESTS/flagparse.sh 5 | 6 | # Path to test directory 7 | testpath=${KDBTESTS}/stp/chainedlogmodes 8 | 9 | # Start procs 10 | ${TORQHOME}/torq.sh start discovery1 stp1 sctp1 rdb1 -csv ${testpath}/process.csv 11 | 12 | # Start test proc 13 | /usr/bin/rlwrap q ${TORQHOME}/torq.q \ 14 | -proctype test -procname test1 \ 15 | -test ${testpath} \ 16 | -load ${KDBTESTS}/helperfunctions.q ${testpath}/settings.q \ 17 | -results ${KDBTESTS}/stp/results/ \ 18 | -procfile ${testpath}/process.csv \ 19 | -runtime $run \ 20 | $debug $stop $quiet 21 | 22 | # Shut down procs 23 | ${TORQHOME}/torq.sh stop discovery1 stp1 sctp1 rdb1 -csv ${testpath}/process.csv 24 | -------------------------------------------------------------------------------- /tests/stp/chainedperiodend/settings.q: -------------------------------------------------------------------------------- 1 | // IPC connection parameters 2 | .servers.CONNECTIONS:`rdb`segmentedtickerplant`segmentedchainedtickerplant; 3 | .servers.USERPASS:`admin:admin; 4 | 5 | // Paths to process CSV and test STP log directory 6 | processcsv:getenv[`KDBTESTS],"/stp/chainedperiodend/process.csv"; 7 | testlogdb:"testlog"; 8 | 9 | // Test updates 10 | testtrade:((5#`GOOG),5?`4;10?100.0;10?100i;10#0b;10?.Q.A;10?.Q.A;10#`buy); 11 | testquote:(10?`4;(5?50.0),50+5?50.0;10?100.0;10?100i;10?100i;10?.Q.A;10?.Q.A;10#`3); 12 | 13 | // End period function to send to subs 14 | endp:{[x;y;z] .tst.endp:@[{1+value x};`.tst.endp;0]}; 15 | 16 | // Flag to save tests to disk 17 | .k4.savetodisk:1b; -------------------------------------------------------------------------------- /tests/stp/chainedrecovery/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Handle command-line arguments 4 | source $KDBTESTS/flagparse.sh 5 | 6 | # Path to test directory 7 | testpath=${KDBTESTS}/stp/chainedrecovery 8 | 9 | # Start procs 10 | ${TORQHOME}/torq.sh start discovery1 -csv ${testpath}/process.csv 11 | 12 | # Start test proc 13 | /usr/bin/rlwrap q ${TORQHOME}/torq.q \ 14 | -proctype test -procname test1 \ 15 | -test ${testpath} \ 16 | -load ${KDBTESTS}/helperfunctions.q ${testpath}/settings.q \ 17 | -results ${KDBTESTS}/stp/results/ \ 18 | -runtime $run \ 19 | -procfile ${testpath}/process.csv \ 20 | $debug $stop $quiet 21 | 22 | # Shut down procs 23 | ${TORQHOME}/torq.sh stop discovery1 stp1 stptabperiod rdball rdbsymfilt rdbcomplexfilt -csv ${testpath}/process.csv 24 | -------------------------------------------------------------------------------- /tests/stp/custommode/process.csv: -------------------------------------------------------------------------------- 1 | host,port,proctype,procname,U,localtime,g,T,w,load,startwithall,extras,qcmd 2 | localhost,{KDBBASEPORT}+100,discovery,discovery1,${TORQHOME}/appconfig/passwords/accesslist.txt,1,0,,,${KDBCODE}/processes/discovery.q,1,,q 3 | localhost,{KDBBASEPORT}+101,segmentedtickerplant,stp1,${TORQHOME}/appconfig/passwords/accesslist.txt,1,0,,,${KDBCODE}/processes/segmentedtickerplant.q,1,-schemafile ${TORQHOME}/database.q -.stplg.multilog custom -.stplg.customcsv ${KDBTESTS}/stpcustom.csv,q 4 | localhost,{KDBBASEPORT}+102,rdb,rdb1,${TORQHOME}/appconfig/passwords/accesslist.txt,1,1,180,,${KDBCODE}/processes/rdb.q,1,-.rdb.replaylog 0b,q 5 | -------------------------------------------------------------------------------- /tests/stp/custommode/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Handle command-line arguments 4 | source $KDBTESTS/flagparse.sh 5 | 6 | # Path to test directory 7 | testpath=${KDBTESTS}/stp/custommode 8 | 9 | # Start procs 10 | ${TORQHOME}/torq.sh start discovery1 rdb1 stp1 -csv ${testpath}/process.csv 11 | 12 | # Start test proc 13 | /usr/bin/rlwrap q ${TORQHOME}/torq.q \ 14 | -proctype test -procname test1 \ 15 | -test ${testpath} \ 16 | -load ${KDBTESTS}/helperfunctions.q ${testpath}/settings.q \ 17 | -testresults ${KDBTESTS}/stp/results/ \ 18 | -procfile ${testpath}/process.csv \ 19 | -runtime $run \ 20 | $debug $stop $write $quiet 21 | 22 | # Shut down procs 23 | ${TORQHOME}/torq.sh stop discovery1 rdb1 stp1 -csv ${testpath}/process.csv 24 | -------------------------------------------------------------------------------- /tests/stp/eod/process.csv: -------------------------------------------------------------------------------- 1 | host,port,proctype,procname,U,localtime,g,T,w,load,startwithall,extras,qcmd 2 | localhost,{KDBBASEPORT}+100,discovery,discovery1,${TORQHOME}/appconfig/passwords/accesslist.txt,1,0,,,${KDBCODE}/processes/discovery.q,1,,q 3 | localhost,{KDBBASEPORT}+101,segmentedtickerplant,stp1,${TORQHOME}/appconfig/passwords/accesslist.txt,1,0,,,${KDBCODE}/processes/segmentedtickerplant.q,1,-schemafile ${TORQHOME}/database.q,q 4 | localhost,{KDBBASEPORT}+102,rdb,rdb1,${TORQHOME}/appconfig/passwords/accesslist.txt,1,1,180,,${KDBCODE}/processes/rdb.q,1,-.rdb.replaylog 0b,q 5 | -------------------------------------------------------------------------------- /tests/stp/eod/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Handle command-line arguments 4 | source $KDBTESTS/flagparse.sh 5 | 6 | # Path to test directory 7 | testpath=${KDBTESTS}/stp/eod 8 | 9 | # Start procs 10 | ${TORQHOME}/torq.sh start discovery1 rdb1 stp1 -csv ${testpath}/process.csv 11 | 12 | # Start test proc 13 | /usr/bin/rlwrap q ${TORQHOME}/torq.q \ 14 | -proctype test -procname test1 \ 15 | -test ${testpath} \ 16 | -load ${KDBTESTS}/helperfunctions.q ${testpath}/settings.q \ 17 | -testresults ${KDBTESTS}/stp/results/ \ 18 | -procfile ${testpath}/process.csv \ 19 | -runtime $run \ 20 | $debug $stop $write $quiet 21 | 22 | # Shut down procs 23 | ${TORQHOME}/torq.sh stop discovery1 rdb1 stp1 -csv ${testpath}/process.csv 24 | -------------------------------------------------------------------------------- /tests/stp/eod/settings.q: -------------------------------------------------------------------------------- 1 | // IPC connection parameters 2 | .servers.CONNECTIONS:`rdb`segmentedtickerplant; 3 | .servers.USERPASS:`admin:admin; 4 | 5 | // Paths to process CSV and test STP log directory 6 | processcsv:getenv[`KDBTESTS],"/stp/eod/process.csv"; 7 | 8 | // Function projections (using functions from helperfunctions.q) 9 | startproc:startorstopproc["start";;processcsv]; 10 | stopproc:startorstopproc["stop";;processcsv]; -------------------------------------------------------------------------------- /tests/stp/exit/process.csv: -------------------------------------------------------------------------------- 1 | host,port,proctype,procname,U,localtime,g,T,w,load,startwithall,extras,qcmd 2 | localhost,{KDBBASEPORT}+100,discovery,discovery1,${TORQHOME}/appconfig/passwords/accesslist.txt,1,0,,,${KDBCODE}/processes/discovery.q,1,,q 3 | localhost,{KDBBASEPORT}+101,segmentedtickerplant,stpex,${TORQHOME}/appconfig/passwords/accesslist.txt,1,0,,,${KDBCODE}/processes/segmentedtickerplant.q,1,-schemafile ${TORQHOME}/database.q,q -------------------------------------------------------------------------------- /tests/stp/exit/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Handle command-line arguments 4 | source $KDBTESTS/flagparse.sh 5 | 6 | # Path to test directory 7 | testpath=${KDBTESTS}/stp/exit 8 | 9 | ${TORQHOME}/torq.sh start discovery1 stpex -csv ${testpath}/process.csv 10 | 11 | /usr/bin/rlwrap q ${TORQHOME}/torq.q \ 12 | -proctype test -procname test1 \ 13 | -test ${testpath} \ 14 | -load ${KDBTESTS}/helperfunctions.q ${testpath}/settings.q \ 15 | -testresults ${KDBTESTS}/stp/results/ \ 16 | -procfile ${testpath}/process.csv \ 17 | -runtime $run \ 18 | $debug $stop $write $quiet 19 | 20 | ${TORQHOME}/torq.sh stop discovery1 stpex -csv ${testpath}/process.csv -------------------------------------------------------------------------------- /tests/stp/exit/settings.q: -------------------------------------------------------------------------------- 1 | // IPC connection parameters 2 | .servers.CONNECTIONS:`rdb`segmentedtickerplant; 3 | .servers.USERPASS:`admin:admin; 4 | 5 | // Paths to process CSV, strings to move the sub CSV around 6 | processcsv:getenv[`KDBTESTS],"/stp/exit/process.csv"; 7 | tstlogs:"stpex"; 8 | tstlogsdir:hsym `$getenv[`KDBTPLOG],"/",tstlogs,"_",string .z.d; 9 | 10 | // Function projections (using functions from helperfunctions.q) 11 | startproc:startorstopproc["start";;processcsv]; -------------------------------------------------------------------------------- /tests/stp/housekeeping/logs/logs/err20201006204448: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/housekeeping/logs/logs/err20201006204448 -------------------------------------------------------------------------------- /tests/stp/housekeeping/logs/logs/err20201006204450: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/housekeeping/logs/logs/err20201006204450 -------------------------------------------------------------------------------- /tests/stp/housekeeping/logs/logs/stpmeta: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/housekeeping/logs/logs/stpmeta -------------------------------------------------------------------------------- /tests/stp/housekeeping/logs/logs/stpnone_20201006204448: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/housekeeping/logs/logs/stpnone_20201006204448 -------------------------------------------------------------------------------- /tests/stp/housekeeping/logs/logs/stpnone_20201006204450: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/housekeeping/logs/logs/stpnone_20201006204450 -------------------------------------------------------------------------------- /tests/stp/housekeeping/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Handle command-line arguments 4 | source $KDBTESTS/flagparse.sh 5 | 6 | # Path to test directory 7 | testpath=${KDBTESTS}/stp/housekeeping 8 | 9 | # Start procs 10 | ${TORQHOME}/torq.sh start discovery1 housekeeping1 11 | 12 | # Start test proc 13 | /usr/bin/rlwrap q ${TORQHOME}/torq.q \ 14 | -proctype test -procname test1 \ 15 | -test ${testpath} \ 16 | -load ${KDBTESTS}/helperfunctions.q ${testpath}/settings.q \ 17 | -testresults ${KDBTESTS}/stp/results/ \ 18 | -runtime $run \ 19 | $debug $stop $write $quiet 20 | 21 | # Shut down procs 22 | ${TORQHOME}/torq.sh stop discovery1 housekeeping1 -------------------------------------------------------------------------------- /tests/stp/housekeeping/settings.q: -------------------------------------------------------------------------------- 1 | // IPC connection parameters 2 | .servers.CONNECTIONS:`housekeeping; 3 | .servers.USERPASS:`admin:admin; 4 | 5 | // Paths 6 | testlogs:getenv[`KDBTESTS],"/stp/housekeeping/logs/logs"; 7 | copylogs:getenv[`KDBTESTS],"/stp/housekeeping/logs/copy"; 8 | copytar:getenv[`KDBTESTS],"/stp/housekeeping/logs/copy.tar.gz"; 9 | extrtar:getenv[`KDBTESTS],"/stp/housekeeping/logs/home"; 10 | copystr:"cp -r ",testlogs," ",copylogs; 11 | tarstr:"tar -xvf ",copytar," -C ",getenv[`KDBTESTS],"/stp/housekeeping/logs"; -------------------------------------------------------------------------------- /tests/stp/housekeeping/zippingtest.csv: -------------------------------------------------------------------------------- 1 | action,ms,bytes,lang,code,repeat,minver,comment 2 | before,0,0,q,.servers.startup[],1,,"Set up TorQ connection management" 3 | before,0,0,q,hkhandle:gethandle[`housekeeping1],1,,"Get housekeeping handle" 4 | before,0,0,q,system copystr,1,,"Create copy of log directory" 5 | run,0,0,q,hkhandle(`tardir;copylogs),1,,"Zip the copy directory" 6 | true,0,0,q,0h~type key hsym `$copylogs,1,,"Check the copy directory no longer exists" 7 | true,0,0,q,all (key hsym `$testlogs) in `$last each "/" vs' 1_system tarstr,1,,"Make sure all original files are in tar file" 8 | after,0,0,q,.os.del copytar,1,,"Remove tar file" 9 | after,0,0,q,.os.deldir extrtar,1,,"Remove extracted folder" -------------------------------------------------------------------------------- /tests/stp/idbdefault/config/sort.csv: -------------------------------------------------------------------------------- 1 | tabname,att,column,sort 2 | quote,p,sym,1 3 | trade,p,sym,1 4 | default,p,sym,1 -------------------------------------------------------------------------------- /tests/stp/idbdefault/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Handle command-line arguments 4 | source $KDBTESTS/flagparse.sh 5 | 6 | # Path to test directory 7 | testpath=${KDBTESTS}/stp/idbdefault 8 | 9 | # Start procs 10 | ${TORQHOME}/torq.sh start discovery1 -csv ${testpath}/process.csv 11 | 12 | # Start test proc 13 | /usr/bin/rlwrap q ${TORQHOME}/torq.q \ 14 | -proctype test -procname test1 \ 15 | -test ${testpath} \ 16 | -load ${KDBTESTS}/helperfunctions.q ${testpath}/settings.q \ 17 | -testresults ${KDBTESTS}/stp/results/ \ 18 | -runtime $run \ 19 | -procfile ${testpath}/process.csv \ 20 | $debug $stop $write $quiet 21 | 22 | # Shut down procs 23 | ${TORQHOME}/torq.sh stop discovery1 -csv ${testpath}/process.csv -------------------------------------------------------------------------------- /tests/stp/idbpartbyenum/config/sort.csv: -------------------------------------------------------------------------------- 1 | tabname,att,column,sort 2 | quote,p,sym,1 3 | trade,p,sym,1 4 | default,p,sym,1 -------------------------------------------------------------------------------- /tests/stp/idbpartbyenum/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Handle command-line arguments 4 | source $KDBTESTS/flagparse.sh 5 | 6 | # Path to test directory 7 | testpath=${KDBTESTS}/stp/idbpartbyenum 8 | 9 | # Start procs 10 | ${TORQHOME}/torq.sh start discovery1 -csv ${testpath}/process.csv 11 | 12 | # Start test proc 13 | /usr/bin/rlwrap q ${TORQHOME}/torq.q \ 14 | -proctype test -procname test1 \ 15 | -test ${testpath} \ 16 | -load ${KDBTESTS}/helperfunctions.q ${testpath}/settings.q \ 17 | -testresults ${KDBTESTS}/stp/results/ \ 18 | -runtime $run \ 19 | -procfile ${testpath}/process.csv \ 20 | $debug $stop $write $quiet 21 | 22 | # Shut down procs 23 | ${TORQHOME}/torq.sh stop discovery1 -csv ${testpath}/process.csv -------------------------------------------------------------------------------- /tests/stp/periodend/settings.q: -------------------------------------------------------------------------------- 1 | // IPC connection parameters 2 | .servers.CONNECTIONS:`rdb`segmentedtickerplant; 3 | .servers.USERPASS:`admin:admin; 4 | 5 | // Paths to process CSV and test STP log directory 6 | processcsv:getenv[`KDBTESTS],"/stp/periodend/process.csv"; 7 | 8 | // Test updates 9 | testtrade:((5#`GOOG),5?`4;10?100.0;10?100i;10#0b;10?.Q.A;10?.Q.A;10#`buy); 10 | testquote:(10?`4;(5?50.0),50+5?50.0;10?100.0;10?100i;10?100i;10?.Q.A;10?.Q.A;10#`3); 11 | 12 | // End period function to send to subs 13 | endp:{[x;y;z] .tst.endp:@[{1+value x};`.tst.endp;0]}; -------------------------------------------------------------------------------- /tests/stp/pubsub/process.csv: -------------------------------------------------------------------------------- 1 | host,port,proctype,procname,U,localtime,g,T,w,load,startwithall,extras,qcmd 2 | localhost,{KDBBASEPORT}+100,discovery,discovery1,${TORQHOME}/appconfig/passwords/accesslist.txt,1,0,,,${KDBCODE}/processes/discovery.q,1,,q 3 | localhost,{KDBBASEPORT}+101,pubsub,ps1,${TORQHOME}/appconfig/passwords/accesslist.txt,1,0,,,${KDBTESTS}/stp/pubsub/ps.q,1,,q -------------------------------------------------------------------------------- /tests/stp/pubsub/ps.q: -------------------------------------------------------------------------------- 1 | // Load in table schemas, pubsub is loaded by torq.q 2 | .proc.loadf[getenv[`TORQHOME],"/database.q"]; -------------------------------------------------------------------------------- /tests/stp/pubsub/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Handle command-line arguments 4 | source $KDBTESTS/flagparse.sh 5 | 6 | # Path to test directory 7 | testpath=${KDBTESTS}/stp/pubsub 8 | 9 | ${TORQHOME}/torq.sh start discovery1 ps1 -csv ${testpath}/process.csv 10 | 11 | /usr/bin/rlwrap q ${TORQHOME}/torq.q \ 12 | -proctype test -procname test1 \ 13 | -test ${testpath} \ 14 | -load ${KDBTESTS}/helperfunctions.q ${testpath}/settings.q \ 15 | -testresults ${KDBTESTS}/stp/results/ \ 16 | -procfile ${testpath}/process.csv \ 17 | -runtime $run \ 18 | $debug $stop $write $quiet 19 | 20 | ${TORQHOME}/torq.sh stop discovery1 ps1 -csv ${testpath}/process.csv -------------------------------------------------------------------------------- /tests/stp/pubsub/settings.q: -------------------------------------------------------------------------------- 1 | // IPC connection parameters 2 | .servers.CONNECTIONS:`pubsub; 3 | .servers.USERPASS:`admin:admin; 4 | 5 | // Path to table schemas 6 | schemapath:getenv[`TORQHOME],"/database.q"; 7 | 8 | // Keyed sub table 9 | ksubtab:1!enlist `tabname`filters`columns!(`trade;"sym in `GOOG`AMZN,price>80";"time,sym,price"); 10 | 11 | // Define local functions to be called from pubsub 12 | endofperiod:{[x;y;z] .tst.eop:@[{1+value x};`.tst.eop;0]}; 13 | endofday:{[x;y] .tst.eod:@[{1+value x};`.tst.eod;0]}; 14 | upd:{[t;x] .tst.upd:@[{1+value x};`.tst.upd;0]}; 15 | 16 | // Test trade update 17 | testtrade:(.z.p;`sym;90f;50;1b;"H";"I";`ask); -------------------------------------------------------------------------------- /tests/stp/recovery/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Handle command-line arguments 4 | source $KDBTESTS/flagparse.sh 5 | 6 | # Path to test directory 7 | testpath=${KDBTESTS}/stp/recovery 8 | 9 | # Start procs 10 | ${TORQHOME}/torq.sh start discovery1 -csv ${testpath}/process.csv 11 | 12 | # Start test proc 13 | /usr/bin/rlwrap q ${TORQHOME}/torq.q \ 14 | -proctype test -procname test1 \ 15 | -test ${testpath} \ 16 | -load ${KDBTESTS}/helperfunctions.q ${testpath}/settings.q \ 17 | -testresults ${KDBTESTS}/stp/results/ \ 18 | -runtime $run \ 19 | -procfile ${testpath}/process.csv \ 20 | $debug $stop $write $quiet 21 | 22 | # Shut down procs 23 | ${TORQHOME}/torq.sh stop discovery1 rdball stprepperiod -csv ${testpath}/process.csv -------------------------------------------------------------------------------- /tests/stp/recovery/settings.q: -------------------------------------------------------------------------------- 1 | // IPC connection parameters 2 | .servers.CONNECTIONS:`rdb`segmentedtickerplant`tickerplant; 3 | .servers.USERPASS:`admin:admin; 4 | 5 | // Paths to process CSV and test STP log directory 6 | processcsv:getenv[`KDBTESTS],"/stp/recovery/process.csv"; 7 | stptestlogs:getenv[`KDBTESTS],"/stp/recovery/testlog"; 8 | stporiglogs:getenv[`KDBTPLOG]; 9 | testlogdb:"testlog"; 10 | 11 | // Test updates 12 | testtrade:((5#`GOOG),5?`4;10?100.0;10?100i;10#0b;10?.Q.A;10?.Q.A;10#`buy); 13 | testquote:(10?`4;(5?50.0),50+5?50.0;10?100.0;10?100i;10?100i;10?.Q.A;10?.Q.A;10#`3); 14 | 15 | // Function projections (using functions from helperfunctions.q) 16 | startproc:startorstopproc["start";;processcsv]; 17 | stopproc:startorstopproc["stop";;processcsv]; -------------------------------------------------------------------------------- /tests/stp/strsub/process.csv: -------------------------------------------------------------------------------- 1 | host,port,proctype,procname,U,localtime,g,T,w,load,startwithall,extras,qcmd 2 | localhost,{KDBBASEPORT}+100,discovery,discovery1,${TORQHOME}/appconfig/passwords/accesslist.txt,1,0,,,${KDBCODE}/processes/discovery.q,1,,q 3 | localhost,{KDBBASEPORT}+101,segmentedtickerplant,stp1,${TORQHOME}/appconfig/passwords/accesslist.txt,1,0,,,${KDBCODE}/processes/segmentedtickerplant.q,1,-schemafile ${TORQHOME}/database.q,q -------------------------------------------------------------------------------- /tests/stp/strsub/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Handle command-line arguments 4 | source $KDBTESTS/flagparse.sh 5 | 6 | # Path to test directory 7 | testpath=${KDBTESTS}/stp/strsub 8 | 9 | ${TORQHOME}/torq.sh start discovery1 stp1 -csv ${testpath}/process.csv 10 | 11 | /usr/bin/rlwrap q ${TORQHOME}/torq.q \ 12 | -proctype test -procname test1 \ 13 | -test ${testpath} \ 14 | -load ${KDBTESTS}/helperfunctions.q ${testpath}/settings.q \ 15 | -testresults ${KDBTESTS}/stp/results/ \ 16 | -procfile ${testpath}/process.csv \ 17 | -runtime $run \ 18 | $debug $stop $write $quiet 19 | 20 | ${TORQHOME}/torq.sh stop discovery1 stp1 -csv ${testpath}/process.csv -------------------------------------------------------------------------------- /tests/stp/strsub/settings.q: -------------------------------------------------------------------------------- 1 | // IPC connection parameters 2 | .servers.CONNECTIONS:`segmentedtickerplant; 3 | .servers.USERPASS:`admin:admin; 4 | 5 | // Paths to process CSV, strings to move the sub CSV around 6 | processcsv:getenv[`KDBTESTS],"/stp/exit/process.csv"; 7 | tstlogs:"tstlogs"; 8 | tstlogsdir:hsym `$getenv[`KDBTPLOG],"/",tstlogs,"_",string .z.d; 9 | 10 | // Function projections (using functions from helperfunctions.q) 11 | startproc:startorstopproc["start";;processcsv]; 12 | 13 | // Subscription strings to test 14 | simplesyms:"AMZN,MSFT"; 15 | complexwhr:"sym in `GOOG`IBM,price>90"; 16 | columnlist:"sym,price"; 17 | badwhr:"sm in `GOOG`IBM,price>90"; -------------------------------------------------------------------------------- /tests/stp/subfile/process.csv: -------------------------------------------------------------------------------- 1 | host,port,proctype,procname,U,localtime,g,T,w,load,startwithall,extras,qcmd 2 | localhost,{KDBBASEPORT}+100,discovery,discovery1,${TORQHOME}/appconfig/passwords/accesslist.txt,1,0,,,${KDBCODE}/processes/discovery.q,1,,q 3 | localhost,{KDBBASEPORT}+101,rdb,rdb1,${TORQHOME}/appconfig/passwords/accesslist.txt,1,1,180,,${KDBCODE}/processes/rdb.q,1,-.rdb.replaylog 0b -.rdb.subfiltered 1 -.rdb.subcsv ${KDBTESTS}/rdbsub.csv,q 4 | localhost,{KDBBASEPORT}+104,segmentedtickerplant,stp1,${TORQHOME}/appconfig/passwords/accesslist.txt,1,0,,,${KDBCODE}/processes/segmentedtickerplant.q,1,-schemafile ${TORQHOME}/database.q,q -------------------------------------------------------------------------------- /tests/stp/subfile/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Handle command-line arguments 4 | source $KDBTESTS/flagparse.sh 5 | 6 | # Path to test directory 7 | testpath=${KDBTESTS}/stp/subfile 8 | 9 | ${TORQHOME}/torq.sh start discovery1 stp1 rdb1 -csv ${testpath}/process.csv 10 | 11 | /usr/bin/rlwrap q ${TORQHOME}/torq.q \ 12 | -proctype test -procname test1 \ 13 | -test ${testpath} \ 14 | -load ${KDBTESTS}/helperfunctions.q ${testpath}/settings.q \ 15 | -testresults ${KDBTESTS}/stp/results/ \ 16 | -procfile ${testpath}/process.csv \ 17 | -runtime $run \ 18 | $debug $stop $write $quiet 19 | 20 | ${TORQHOME}/torq.sh stop discovery1 stp1 rdb1 -csv ${testpath}/process.csv -------------------------------------------------------------------------------- /tests/stp/subfile/settings.q: -------------------------------------------------------------------------------- 1 | // Paths to process CSV, strings to move the sub CSV around 2 | processcsv:getenv[`KDBTESTS],"/stp/wdb/process.csv"; 3 | mv1:" " sv enlist["mv"],@[getenv each `KDBTESTS`TORQHOME;0;,;"/rdbsub.csv"]; 4 | mv2:" " sv enlist["mv"],@[getenv each `TORQHOME`KDBTESTS;0;,;"/rdbsub.csv"]; 5 | 6 | // Function projections (using functions from helperfunctions.q) 7 | startproc:startorstopproc["start";;processcsv]; -------------------------------------------------------------------------------- /tests/stp/subfile/subfilemissing.csv: -------------------------------------------------------------------------------- 1 | action,ms,bytes,lang,code,repeat,minver,comment 2 | true,0,0,q,isalive["rdb1"],1,,"Make sure RDB is up" 3 | run,0,0,q,kill9proc["rdb1"],1,,"Kill RDB" 4 | true,0,0,q,not isalive["rdb1"],1,,"Make sure it is down" 5 | run,0,0,q,system mv1,1,,"Move sub file to TorQ home" 6 | run,0,0,q,startproc["rdb1"],1,,"Try to start RDB again" 7 | true,0,0,q,not isalive["rdb1"],1,,"Make sure it is still down" 8 | after,0,0,q,system mv2,1,,"Move sub file back to appconfig" -------------------------------------------------------------------------------- /tests/stp/subscription/rdbsub.csv: -------------------------------------------------------------------------------- 1 | tabname,filters,columns 2 | trade,"sym=`GOOG","time,sym" 3 | quote,"bid>50.0", 4 | -------------------------------------------------------------------------------- /tests/stp/subscription/settings.q: -------------------------------------------------------------------------------- 1 | // IPC connection parameters 2 | .servers.CONNECTIONS:`rdb`segmentedtickerplant; 3 | .servers.USERPASS:`admin:admin; 4 | 5 | // Test trade batches 6 | testtrade:((5#`GOOG),5?`4;10?100.0;10?100i;10#0b;10?.Q.A;10?.Q.A;10#`buy); 7 | testquote:(10?`4;(5?50.0),50+5?50.0;10?100.0;10?100i;10?100i;10?.Q.A;10?.Q.A;10#`3); 8 | 9 | // Local trade table schema 10 | trade:flip `time`sym`price`size`stop`cond`ex`side!"PSFIBCCS" $\: (); 11 | quote:flip `time`sym`bid`ask`bsize`asize`mode`ex`src!"PSFFJJCCS" $\: (); 12 | 13 | // Local upd and error log function 14 | upd:{[t;x] t insert x}; 15 | upderr:{[t;x].tst.err:x}; 16 | 17 | // Test db name 18 | testlogdb:"testlog"; -------------------------------------------------------------------------------- /tests/stp/tickerlog/logs/oldlog/testoldlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/tickerlog/logs/oldlog/testoldlog -------------------------------------------------------------------------------- /tests/stp/tickerlog/logs/oldlogdir/oldlog1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/tickerlog/logs/oldlogdir/oldlog1 -------------------------------------------------------------------------------- /tests/stp/tickerlog/logs/oldlogdir/oldlog2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/tickerlog/logs/oldlogdir/oldlog2 -------------------------------------------------------------------------------- /tests/stp/tickerlog/logs/stpnone/err20201006204448: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/tickerlog/logs/stpnone/err20201006204448 -------------------------------------------------------------------------------- /tests/stp/tickerlog/logs/stpnone/err20201006204450: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/tickerlog/logs/stpnone/err20201006204450 -------------------------------------------------------------------------------- /tests/stp/tickerlog/logs/stpnone/stpmeta: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/tickerlog/logs/stpnone/stpmeta -------------------------------------------------------------------------------- /tests/stp/tickerlog/logs/stpnone/stpnone_20201006204448: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/tickerlog/logs/stpnone/stpnone_20201006204448 -------------------------------------------------------------------------------- /tests/stp/tickerlog/logs/stpnone/stpnone_20201006204450: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/tickerlog/logs/stpnone/stpnone_20201006204450 -------------------------------------------------------------------------------- /tests/stp/tickerlog/logs/stptabperiod/err20201006204518: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/tickerlog/logs/stptabperiod/err20201006204518 -------------------------------------------------------------------------------- /tests/stp/tickerlog/logs/stptabperiod/err20201006204520: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/tickerlog/logs/stptabperiod/err20201006204520 -------------------------------------------------------------------------------- /tests/stp/tickerlog/logs/stptabperiod/err20201006204522: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/tickerlog/logs/stptabperiod/err20201006204522 -------------------------------------------------------------------------------- /tests/stp/tickerlog/logs/stptabperiod/err20201006204524: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/tickerlog/logs/stptabperiod/err20201006204524 -------------------------------------------------------------------------------- /tests/stp/tickerlog/logs/stptabperiod/logmsg20201006204518: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/tickerlog/logs/stptabperiod/logmsg20201006204518 -------------------------------------------------------------------------------- /tests/stp/tickerlog/logs/stptabperiod/logmsg20201006204520: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/tickerlog/logs/stptabperiod/logmsg20201006204520 -------------------------------------------------------------------------------- /tests/stp/tickerlog/logs/stptabperiod/logmsg20201006204522: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/tickerlog/logs/stptabperiod/logmsg20201006204522 -------------------------------------------------------------------------------- /tests/stp/tickerlog/logs/stptabperiod/logmsg20201006204524: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/tickerlog/logs/stptabperiod/logmsg20201006204524 -------------------------------------------------------------------------------- /tests/stp/tickerlog/logs/stptabperiod/packets20201006204518: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/tickerlog/logs/stptabperiod/packets20201006204518 -------------------------------------------------------------------------------- /tests/stp/tickerlog/logs/stptabperiod/packets20201006204520: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/tickerlog/logs/stptabperiod/packets20201006204520 -------------------------------------------------------------------------------- /tests/stp/tickerlog/logs/stptabperiod/packets20201006204522: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/tickerlog/logs/stptabperiod/packets20201006204522 -------------------------------------------------------------------------------- /tests/stp/tickerlog/logs/stptabperiod/packets20201006204524: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/tickerlog/logs/stptabperiod/packets20201006204524 -------------------------------------------------------------------------------- /tests/stp/tickerlog/logs/stptabperiod/quote20201006204518: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/tickerlog/logs/stptabperiod/quote20201006204518 -------------------------------------------------------------------------------- /tests/stp/tickerlog/logs/stptabperiod/quote20201006204520: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/tickerlog/logs/stptabperiod/quote20201006204520 -------------------------------------------------------------------------------- /tests/stp/tickerlog/logs/stptabperiod/quote20201006204522: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/tickerlog/logs/stptabperiod/quote20201006204522 -------------------------------------------------------------------------------- /tests/stp/tickerlog/logs/stptabperiod/quote20201006204524: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/tickerlog/logs/stptabperiod/quote20201006204524 -------------------------------------------------------------------------------- /tests/stp/tickerlog/logs/stptabperiod/quote_iex20201006204518: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/tickerlog/logs/stptabperiod/quote_iex20201006204518 -------------------------------------------------------------------------------- /tests/stp/tickerlog/logs/stptabperiod/quote_iex20201006204520: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/tickerlog/logs/stptabperiod/quote_iex20201006204520 -------------------------------------------------------------------------------- /tests/stp/tickerlog/logs/stptabperiod/quote_iex20201006204522: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/tickerlog/logs/stptabperiod/quote_iex20201006204522 -------------------------------------------------------------------------------- /tests/stp/tickerlog/logs/stptabperiod/quote_iex20201006204524: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/tickerlog/logs/stptabperiod/quote_iex20201006204524 -------------------------------------------------------------------------------- /tests/stp/tickerlog/logs/stptabperiod/stpmeta: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/tickerlog/logs/stptabperiod/stpmeta -------------------------------------------------------------------------------- /tests/stp/tickerlog/logs/stptabperiod/trade20201006204518: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/tickerlog/logs/stptabperiod/trade20201006204518 -------------------------------------------------------------------------------- /tests/stp/tickerlog/logs/stptabperiod/trade20201006204520: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/tickerlog/logs/stptabperiod/trade20201006204520 -------------------------------------------------------------------------------- /tests/stp/tickerlog/logs/stptabperiod/trade20201006204522: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/tickerlog/logs/stptabperiod/trade20201006204522 -------------------------------------------------------------------------------- /tests/stp/tickerlog/logs/stptabperiod/trade20201006204524: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/tickerlog/logs/stptabperiod/trade20201006204524 -------------------------------------------------------------------------------- /tests/stp/tickerlog/logs/stptabperiod/trade_iex20201006204518: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/tickerlog/logs/stptabperiod/trade_iex20201006204518 -------------------------------------------------------------------------------- /tests/stp/tickerlog/logs/stptabperiod/trade_iex20201006204520: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/tickerlog/logs/stptabperiod/trade_iex20201006204520 -------------------------------------------------------------------------------- /tests/stp/tickerlog/logs/stptabperiod/trade_iex20201006204522: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/tickerlog/logs/stptabperiod/trade_iex20201006204522 -------------------------------------------------------------------------------- /tests/stp/tickerlog/logs/stptabperiod/trade_iex20201006204524: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/tickerlog/logs/stptabperiod/trade_iex20201006204524 -------------------------------------------------------------------------------- /tests/stp/tickerlog/logs/stptabular/err20201006204546: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/tickerlog/logs/stptabular/err20201006204546 -------------------------------------------------------------------------------- /tests/stp/tickerlog/logs/stptabular/err20201006204548: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/tickerlog/logs/stptabular/err20201006204548 -------------------------------------------------------------------------------- /tests/stp/tickerlog/logs/stptabular/err20201006204550: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/tickerlog/logs/stptabular/err20201006204550 -------------------------------------------------------------------------------- /tests/stp/tickerlog/logs/stptabular/err20201006204552: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/tickerlog/logs/stptabular/err20201006204552 -------------------------------------------------------------------------------- /tests/stp/tickerlog/logs/stptabular/logmsg_20201006204546: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/tickerlog/logs/stptabular/logmsg_20201006204546 -------------------------------------------------------------------------------- /tests/stp/tickerlog/logs/stptabular/logmsg_20201006204548: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/tickerlog/logs/stptabular/logmsg_20201006204548 -------------------------------------------------------------------------------- /tests/stp/tickerlog/logs/stptabular/logmsg_20201006204550: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/tickerlog/logs/stptabular/logmsg_20201006204550 -------------------------------------------------------------------------------- /tests/stp/tickerlog/logs/stptabular/logmsg_20201006204552: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/tickerlog/logs/stptabular/logmsg_20201006204552 -------------------------------------------------------------------------------- /tests/stp/tickerlog/logs/stptabular/packets_20201006204546: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/tickerlog/logs/stptabular/packets_20201006204546 -------------------------------------------------------------------------------- /tests/stp/tickerlog/logs/stptabular/packets_20201006204548: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/tickerlog/logs/stptabular/packets_20201006204548 -------------------------------------------------------------------------------- /tests/stp/tickerlog/logs/stptabular/packets_20201006204550: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/tickerlog/logs/stptabular/packets_20201006204550 -------------------------------------------------------------------------------- /tests/stp/tickerlog/logs/stptabular/packets_20201006204552: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/tickerlog/logs/stptabular/packets_20201006204552 -------------------------------------------------------------------------------- /tests/stp/tickerlog/logs/stptabular/quote_20201006204546: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/tickerlog/logs/stptabular/quote_20201006204546 -------------------------------------------------------------------------------- /tests/stp/tickerlog/logs/stptabular/quote_20201006204548: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/tickerlog/logs/stptabular/quote_20201006204548 -------------------------------------------------------------------------------- /tests/stp/tickerlog/logs/stptabular/quote_20201006204550: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/tickerlog/logs/stptabular/quote_20201006204550 -------------------------------------------------------------------------------- /tests/stp/tickerlog/logs/stptabular/quote_20201006204552: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/tickerlog/logs/stptabular/quote_20201006204552 -------------------------------------------------------------------------------- /tests/stp/tickerlog/logs/stptabular/quote_iex_20201006204546: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/tickerlog/logs/stptabular/quote_iex_20201006204546 -------------------------------------------------------------------------------- /tests/stp/tickerlog/logs/stptabular/quote_iex_20201006204548: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/tickerlog/logs/stptabular/quote_iex_20201006204548 -------------------------------------------------------------------------------- /tests/stp/tickerlog/logs/stptabular/quote_iex_20201006204550: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/tickerlog/logs/stptabular/quote_iex_20201006204550 -------------------------------------------------------------------------------- /tests/stp/tickerlog/logs/stptabular/quote_iex_20201006204552: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/tickerlog/logs/stptabular/quote_iex_20201006204552 -------------------------------------------------------------------------------- /tests/stp/tickerlog/logs/stptabular/stpmeta: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/tickerlog/logs/stptabular/stpmeta -------------------------------------------------------------------------------- /tests/stp/tickerlog/logs/stptabular/trade_20201006204546: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/tickerlog/logs/stptabular/trade_20201006204546 -------------------------------------------------------------------------------- /tests/stp/tickerlog/logs/stptabular/trade_20201006204548: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/tickerlog/logs/stptabular/trade_20201006204548 -------------------------------------------------------------------------------- /tests/stp/tickerlog/logs/stptabular/trade_20201006204550: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/tickerlog/logs/stptabular/trade_20201006204550 -------------------------------------------------------------------------------- /tests/stp/tickerlog/logs/stptabular/trade_20201006204552: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/tickerlog/logs/stptabular/trade_20201006204552 -------------------------------------------------------------------------------- /tests/stp/tickerlog/logs/stptabular/trade_iex_20201006204546: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/tickerlog/logs/stptabular/trade_iex_20201006204546 -------------------------------------------------------------------------------- /tests/stp/tickerlog/logs/stptabular/trade_iex_20201006204548: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/tickerlog/logs/stptabular/trade_iex_20201006204548 -------------------------------------------------------------------------------- /tests/stp/tickerlog/logs/stptabular/trade_iex_20201006204550: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/tickerlog/logs/stptabular/trade_iex_20201006204550 -------------------------------------------------------------------------------- /tests/stp/tickerlog/logs/stptabular/trade_iex_20201006204552: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/tickerlog/logs/stptabular/trade_iex_20201006204552 -------------------------------------------------------------------------------- /tests/stp/tickerlog/logs/zipdir/oldlog1.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/tickerlog/logs/zipdir/oldlog1.gz -------------------------------------------------------------------------------- /tests/stp/tickerlog/logs/zipdir/oldlog2.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/tickerlog/logs/zipdir/oldlog2.gz -------------------------------------------------------------------------------- /tests/stp/tickerlog/logs/zipdirstp/err20201006204518.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/tickerlog/logs/zipdirstp/err20201006204518.gz -------------------------------------------------------------------------------- /tests/stp/tickerlog/logs/zipdirstp/err20201006204520.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/tickerlog/logs/zipdirstp/err20201006204520.gz -------------------------------------------------------------------------------- /tests/stp/tickerlog/logs/zipdirstp/err20201006204522.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/tickerlog/logs/zipdirstp/err20201006204522.gz -------------------------------------------------------------------------------- /tests/stp/tickerlog/logs/zipdirstp/err20201006204524.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/tickerlog/logs/zipdirstp/err20201006204524.gz -------------------------------------------------------------------------------- /tests/stp/tickerlog/logs/zipdirstp/logmsg20201006204518.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/tickerlog/logs/zipdirstp/logmsg20201006204518.gz -------------------------------------------------------------------------------- /tests/stp/tickerlog/logs/zipdirstp/logmsg20201006204520.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/tickerlog/logs/zipdirstp/logmsg20201006204520.gz -------------------------------------------------------------------------------- /tests/stp/tickerlog/logs/zipdirstp/logmsg20201006204522.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/tickerlog/logs/zipdirstp/logmsg20201006204522.gz -------------------------------------------------------------------------------- /tests/stp/tickerlog/logs/zipdirstp/logmsg20201006204524.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/tickerlog/logs/zipdirstp/logmsg20201006204524.gz -------------------------------------------------------------------------------- /tests/stp/tickerlog/logs/zipdirstp/packets20201006204518.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/tickerlog/logs/zipdirstp/packets20201006204518.gz -------------------------------------------------------------------------------- /tests/stp/tickerlog/logs/zipdirstp/packets20201006204520.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/tickerlog/logs/zipdirstp/packets20201006204520.gz -------------------------------------------------------------------------------- /tests/stp/tickerlog/logs/zipdirstp/packets20201006204522.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/tickerlog/logs/zipdirstp/packets20201006204522.gz -------------------------------------------------------------------------------- /tests/stp/tickerlog/logs/zipdirstp/packets20201006204524.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/tickerlog/logs/zipdirstp/packets20201006204524.gz -------------------------------------------------------------------------------- /tests/stp/tickerlog/logs/zipdirstp/quote20201006204518.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/tickerlog/logs/zipdirstp/quote20201006204518.gz -------------------------------------------------------------------------------- /tests/stp/tickerlog/logs/zipdirstp/quote20201006204520.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/tickerlog/logs/zipdirstp/quote20201006204520.gz -------------------------------------------------------------------------------- /tests/stp/tickerlog/logs/zipdirstp/quote20201006204522.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/tickerlog/logs/zipdirstp/quote20201006204522.gz -------------------------------------------------------------------------------- /tests/stp/tickerlog/logs/zipdirstp/quote20201006204524.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/tickerlog/logs/zipdirstp/quote20201006204524.gz -------------------------------------------------------------------------------- /tests/stp/tickerlog/logs/zipdirstp/quote_iex20201006204518.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/tickerlog/logs/zipdirstp/quote_iex20201006204518.gz -------------------------------------------------------------------------------- /tests/stp/tickerlog/logs/zipdirstp/quote_iex20201006204520.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/tickerlog/logs/zipdirstp/quote_iex20201006204520.gz -------------------------------------------------------------------------------- /tests/stp/tickerlog/logs/zipdirstp/quote_iex20201006204522.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/tickerlog/logs/zipdirstp/quote_iex20201006204522.gz -------------------------------------------------------------------------------- /tests/stp/tickerlog/logs/zipdirstp/quote_iex20201006204524.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/tickerlog/logs/zipdirstp/quote_iex20201006204524.gz -------------------------------------------------------------------------------- /tests/stp/tickerlog/logs/zipdirstp/stpmeta.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/tickerlog/logs/zipdirstp/stpmeta.gz -------------------------------------------------------------------------------- /tests/stp/tickerlog/logs/zipdirstp/trade20201006204518.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/tickerlog/logs/zipdirstp/trade20201006204518.gz -------------------------------------------------------------------------------- /tests/stp/tickerlog/logs/zipdirstp/trade20201006204520.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/tickerlog/logs/zipdirstp/trade20201006204520.gz -------------------------------------------------------------------------------- /tests/stp/tickerlog/logs/zipdirstp/trade20201006204522.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/tickerlog/logs/zipdirstp/trade20201006204522.gz -------------------------------------------------------------------------------- /tests/stp/tickerlog/logs/zipdirstp/trade20201006204524.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/tickerlog/logs/zipdirstp/trade20201006204524.gz -------------------------------------------------------------------------------- /tests/stp/tickerlog/logs/zipdirstp/trade_iex20201006204518.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/tickerlog/logs/zipdirstp/trade_iex20201006204518.gz -------------------------------------------------------------------------------- /tests/stp/tickerlog/logs/zipdirstp/trade_iex20201006204520.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/tickerlog/logs/zipdirstp/trade_iex20201006204520.gz -------------------------------------------------------------------------------- /tests/stp/tickerlog/logs/zipdirstp/trade_iex20201006204522.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/tickerlog/logs/zipdirstp/trade_iex20201006204522.gz -------------------------------------------------------------------------------- /tests/stp/tickerlog/logs/zipdirstp/trade_iex20201006204524.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/tickerlog/logs/zipdirstp/trade_iex20201006204524.gz -------------------------------------------------------------------------------- /tests/stp/tickerlog/logs/zipfile/testoldlog.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DataIntellectTech/TorQ/79c41d958e40edfde1f6e1671f2859ccab42a6bc/tests/stp/tickerlog/logs/zipfile/testoldlog.gz -------------------------------------------------------------------------------- /tests/stp/tickerlog/process.csv: -------------------------------------------------------------------------------- 1 | host,port,proctype,procname,U,localtime,g,T,w,load,startwithall,extras,qcmd 2 | localhost,{KDBBASEPORT}+100,discovery,discovery1,${TORQHOME}/appconfig/passwords/accesslist.txt,1,0,,,${KDBCODE}/processes/discovery.q,1,,q 3 | localhost,{KDBBASEPORT}+101,tickerlogreplay,trep1,${TORQHOME}/appconfig/passwords/accesslist.txt,1,0,,,${KDBCODE}/processes/tickerlogreplay.q,1,-.replay.tplogfile $KDBTESTS/stp/tickerlog/logs/oldlog/testoldlog -.replay.schemafile $TORQHOME/database.q -.replay.hdbdir $KDBTESTS/stp/tickerlog/testhdb/ -.replay.exitwhencomplete 0 -.replay.segmentedmode 0 -.replay.autoreplay 0,q 4 | -------------------------------------------------------------------------------- /tests/stp/tickerlog/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Handle command-line arguments 4 | source $KDBTESTS/flagparse.sh 5 | 6 | # Path to test directory 7 | testpath=${KDBTESTS}/stp/tickerlog 8 | 9 | # Start procs 10 | ${TORQHOME}/torq.sh start discovery1 trep1 -csv ${testpath}/process.csv 11 | 12 | # Start test proc 13 | /usr/bin/rlwrap q ${TORQHOME}/torq.q \ 14 | -proctype test -procname test1 \ 15 | -test ${testpath} \ 16 | -load ${KDBTESTS}/helperfunctions.q ${testpath}/settings.q \ 17 | -testresults ${KDBTESTS}/stp/results/ \ 18 | -procfile ${testpath}/process.csv \ 19 | -runtime $run \ 20 | $debug $stop $write $quiet 21 | 22 | # Shut down procs 23 | ${TORQHOME}/torq.sh stop discovery1 trep1 -csv ${testpath}/process.csv 24 | -------------------------------------------------------------------------------- /tests/stp/tz/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Handle command-line arguments 4 | source $KDBTESTS/flagparse.sh 5 | 6 | # Path to test directory 7 | testpath=${KDBTESTS}/stp/tz 8 | 9 | # Start procs 10 | ${TORQHOME}/torq.sh start all -csv ${testpath}/process.csv 11 | 12 | # Start test proc 13 | /usr/bin/rlwrap q ${TORQHOME}/torq.q \ 14 | -proctype test -procname test1 \ 15 | -test ${testpath} \ 16 | -load ${KDBTESTS}/helperfunctions.q ${testpath}/settings.q \ 17 | -testresults ${KDBTESTS}/stp/results/ \ 18 | -runtime $run \ 19 | -procfile ${testpath}/process.csv \ 20 | $debug $stop $write $quiet 21 | 22 | # Shut down procs 23 | ${TORQHOME}/torq.sh stop all -csv ${testpath}/process.csv -------------------------------------------------------------------------------- /tests/stp/tz/tzrolloffset.csv: -------------------------------------------------------------------------------- 1 | action,ms,bytes,lang,code,repeat,minver,comment 2 | before,0,0,q,(hs:value handles) @\: (eodchange;::),1,,"Set custom STP TZ" 3 | before,0,0,q,hs @\: (`.stplg.init;testlogdb),1,,"Reset STP with new TZ" 4 | before,0,0,q,currd1:hs @\: ".eodtime.d",1,,"Get date" 5 | run,0,0,q,system "sleep 2",1,,"Wait for 2 seconds" 6 | run,0,0,q,hs @\: ".z.ts[]",1,,"Trigger EOD" 7 | true,0,0,q,(1+currd1)~hs @\: ".eodtime.d",1,,"See if date has rolled" 8 | true,0,0,q,all not null currd1, hs @\: ".eodtime.d",1,,"Check no dates are null" 9 | run,0,0,q,logdir:1_string handles[`imm](`.stplg.dldir),1,,"Get log directory" 10 | after,0,0,q,.os.deldir logdir,1,,"Delete test STP logs" 11 | -------------------------------------------------------------------------------- /tests/stp/upds/process.csv: -------------------------------------------------------------------------------- 1 | host,port,proctype,procname,U,localtime,g,T,w,load,startwithall,extras,qcmd 2 | localhost,{KDBBASEPORT}+1,discovery,discovery1,${TORQHOME}/appconfig/passwords/accesslist.txt,1,0,,,${KDBCODE}/processes/discovery.q,1,,q 3 | localhost,{KDBBASEPORT}+2,rdb,rdb1,${TORQHOME}/appconfig/passwords/accesslist.txt,1,1,180,,${KDBCODE}/processes/rdb.q,1,,q 4 | localhost,{KDBBASEPORT}+24,segmentedtickerplant,stp1,${TORQHOME}/appconfig/passwords/accesslist.txt,1,0,,,${KDBCODE}/processes/segmentedtickerplant.q,1,-schemafile ${KDBTESTS}/stp/upds/testdatabase.q,q 5 | -------------------------------------------------------------------------------- /tests/stp/upds/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Handle command-line arguments 4 | source $KDBTESTS/flagparse.sh 5 | 6 | # Path to test directory 7 | testpath=${KDBTESTS}/stp/upds 8 | 9 | # Start procs 10 | ${TORQHOME}/torq.sh start discovery1 stp1 -csv ${KDBTESTS}/stp/upds/process.csv 11 | 12 | # Start test proc 13 | /usr/bin/rlwrap q ${TORQHOME}/torq.q \ 14 | -proctype test -procname test1 \ 15 | -test ${testpath} \ 16 | -load ${KDBTESTS}/helperfunctions.q ${testpath}/settings.q \ 17 | -results ${KDBTESTS}/stp/results/ \ 18 | -runtime $run \ 19 | -procfile ${testpath}/process.csv \ 20 | $debug $stop $write $quiet 21 | 22 | # Shut down procs 23 | ${TORQHOME}/torq.sh stop discovery1 rdb1 stp1 -csv ${KDBTESTS}/stp/upds/process.csv 24 | -------------------------------------------------------------------------------- /tests/stp/wdb/config/sort.csv: -------------------------------------------------------------------------------- 1 | tabname,att,column,sort 2 | quote,p,sym,1 3 | trade,p,sym,1 4 | default,p,sym,1 -------------------------------------------------------------------------------- /tests/stp/wdb/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Handle command-line arguments 4 | source $KDBTESTS/flagparse.sh 5 | 6 | # Path to test directory 7 | testpath=${KDBTESTS}/stp/wdb 8 | 9 | # Start procs 10 | ${TORQHOME}/torq.sh start discovery1 -csv ${testpath}/process.csv 11 | 12 | # Start test proc 13 | /usr/bin/rlwrap q ${TORQHOME}/torq.q \ 14 | -proctype test -procname test1 \ 15 | -test ${testpath} \ 16 | -load ${KDBTESTS}/helperfunctions.q ${testpath}/settings.q \ 17 | -testresults ${KDBTESTS}/stp/results/ \ 18 | -runtime $run \ 19 | -procfile ${testpath}/process.csv \ 20 | $debug $stop $write $quiet 21 | 22 | # Shut down procs 23 | ${TORQHOME}/torq.sh stop discovery1 -csv ${testpath}/process.csv -------------------------------------------------------------------------------- /tests/stpcustom.csv: -------------------------------------------------------------------------------- 1 | table,mode 2 | trade,periodic 3 | trade_iex,periodic 4 | quote,tabular 5 | quote_iex,tabular 6 | heartbeat,tabperiod -------------------------------------------------------------------------------- /tests/wdb/intpartbyenum/database.q: -------------------------------------------------------------------------------- 1 | tshort:([]enumcol:`short$(); expint:`long$()) 2 | tint: ([]enumcol:`int$(); expint:`long$()) 3 | tlong: ([]enumcol:`long$(); expint:`long$()) 4 | tsym: ([]enumcol:`symbol$(); expint:`long$()) 5 | -------------------------------------------------------------------------------- /tests/wdb/intpartbyenum/settings.q: -------------------------------------------------------------------------------- 1 | // IPC connection parameters 2 | .servers.CONNECTIONS:`wdb`hdb`idb; 3 | .servers.USERPASS:`admin:admin; 4 | 5 | // Filepaths 6 | wdbdir:hsym `$getenv[`KDBTESTS],"/wdb/intpartbyenum/tempwdb"; 7 | hdbdir:hsym `$getenv[`KDBTESTS],"/wdb/intpartbyenum/temphdb"; 8 | symfile:` sv hdbdir,`sym; 9 | 10 | // Test tables with expected int partitions 11 | testtshort:([]enumcol:-0W -1 0 0N 1 0Wh; expint:0 0 0 0 1 32767); 12 | testtint: ([]enumcol:-0W -1 0 0N 1 0Wi; expint:0 0 0 0 1 2147483647); 13 | testtlong: ([]enumcol:-0W -1 0 0N 1 0W; expint:0 0 0 0 1 2147483647); 14 | testtsym: update expint:i from ([]enumcol:`a`b`c`d`e`); 15 | 16 | // All expected int partitions 17 | expints:asc distinct raze (testtshort;testtint;testtlong;testtsym)@\:`expint; 18 | -------------------------------------------------------------------------------- /tests/wdb/intpartbyenum/sort.csv: -------------------------------------------------------------------------------- 1 | tabname,att,column,sort 2 | default,p,enumcol,1 3 | -------------------------------------------------------------------------------- /tests/wdb/nullpartbyenum/config/sort.csv: -------------------------------------------------------------------------------- 1 | tabname,att,column,sort 2 | quote,p,sym,1 3 | trade,p,sym,1 4 | default,p,sym,1 -------------------------------------------------------------------------------- /tests/wdb/nullpartbyenum/database.q: -------------------------------------------------------------------------------- 1 | quote:([]time:`timestamp$(); sym:`g#`symbol$(); bid:`float$(); ask:`float$(); bsize:`long$(); asize:`long$(); mode:`char$(); ex:`char$(); src:`symbol$()) 2 | trade:([]time:`timestamp$(); sym:`g#`symbol$(); price:`float$(); size:`int$(); stop:`boolean$(); cond:`char$(); ex:`char$();side:`symbol$()) 3 | -------------------------------------------------------------------------------- /tests/wdb/nullpartbyenum/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Handle command-line arguments 4 | source $KDBTESTS/flagparse.sh 5 | 6 | # Path to test directory 7 | testpath=${KDBTESTS}/wdb/nullpartbyenum 8 | 9 | # Start procs 10 | ${TORQHOME}/torq.sh start discovery1 stp1 wdbenum hdbenum idbenum sort1 -csv ${testpath}/process.csv 11 | 12 | # Start test proc 13 | /usr/bin/rlwrap q ${TORQHOME}/torq.q \ 14 | -proctype test -procname test1 \ 15 | -test ${testpath} \ 16 | -load ${KDBTESTS}/helperfunctions.q ${testpath}/settings.q \ 17 | -testresults ${KDBTESTS}/stp/results/ \ 18 | -runtime $run \ 19 | -procfile ${testpath}/process.csv \ 20 | $debug $stop $write $quiet 21 | 22 | # Shut down procs 23 | ${TORQHOME}/torq.sh stop discovery1 -csv ${testpath}/process.csv 24 | -------------------------------------------------------------------------------- /tests/wdb/replay/savetables_replay.csv: -------------------------------------------------------------------------------- 1 | action,ms,bytes,lang,code,repeat,minver,comment 2 | before,0,0,q,update active:0b from `.timer.timer,,"Disable timer" 3 | before,0,0,q,.wdb.immediate:1b,,"Show that immediate write not used in .wdb.replayupd" 4 | true,0,0,q,(counts < .wdb.maxrows `quote) and (0 < counts:count quote),1,,"Show number of quotes played back from tplog are less than .wdb.maxrows[`quote]" 5 | true,0,0,q,delete quote from `.; system " " sv (enlist "l"; "/" sv ((getenv `KDBWDB); string .z.d)); 0 = count quote,1,,"Show that replayupd does not trigger savetables when quote is less than .wdb.maxrows[`quote]" 6 | --------------------------------------------------------------------------------