low-latency

How fast is state of the art HFT trading systems today?

霸气de小男生 提交于 2019-12-18 09:59:19
问题 All the time you hear about high frequency trading (HFT) and how damn fast the algorithms are. But I'm wondering - what is fast these days? Update I'm not thinking about the latency caused by the physical distance between an exchange and the server running a trading application, but the latency introduced by the program itself. To be more specific: What is the time from events arriving on the wire in an application to that application outputs an order/price on the wire? I.e. tick-to-trade

AudioTrack: AUDIO_OUTPUT_FLAG_FAST denied by client due to mismatching sample rate

て烟熏妆下的殇ゞ 提交于 2019-12-18 03:57:13
问题 Does anybody know how to fix this warning message? 07-14 10:38:55.411 V/tracker-audiotest(22426): Recording Thread::run(): start audioRecord recording. 07-14 10:45:51.490 "W/AudioTrack( 607): AUDIO_OUTPUT_FLAG_FAST denied by client due to mismatching sample rate (44100 vs 48000)" When I test the audio latency on Android 4.4, I face a suddenly delay increasing after I saw this warning message. But I don't change the sample rate during the test and the initial setting is in 48kHz. This warning

Set Windows command-line terminal title in Python

白昼怎懂夜的黑 提交于 2019-12-17 15:25:39
问题 I'm running several instances of a certain Python script on a Windows machine, each from a different directory and using a separate shell windows. Unfortunately Windows gives each of these shell windows the same name: <User>: C:\Windows\system32\cmd.exe - <script.py> Is it possible to set this name to something else through a Python command? 回答1: This works for Python2.7 under Windows. >>> import ctypes >>> ctypes.windll.kernel32.SetConsoleTitleA("My New Title") 回答2: On Windows, a simple

nodejs - https requests taking too long

笑着哭i 提交于 2019-12-13 03:33:37
问题 So every 0.5 seconds, I'm interested in getting the price of Bitcoin as fast as possible. curl https://www.okcoin.com/api/ticker.do?ok=1 *** 1st I do this in nodejs: var https = require('https'); var options = { host: 'www.okcoin.com', port: 443, path: '/api/ticker.do?ok=1', method: 'GET' }; var time; time=process.hrtime(); var req = https.request(options, function (res) { res.setEncoding('utf8'); res.on('data', function (chunk) { var diff=process.hrtime(time); console.log("took %dms", (diff

Postgres LISTEN/NOTIFY - low latency, realtime?

坚强是说给别人听的谎言 提交于 2019-12-13 01:57:40
问题 I am planning to use postgres LISTEN/NOTIFY aproach to get insert time(actual transaction commit time) of records in a table. To achieve this, I plan to do the following. I issue a notification during insert time as shown below. BEGIN; INSERT INTO table_name(id, ...) values (id,....); select pg_notify('test_channel', 'id - ' || id || ' trans start time - ' || now() || ' notify start time - ' || clock_timestamp()); END; And then I plan to use https://pythonhosted.org/psycopg2/advanced.html

Couchbase: possible reasons for 10x difference in cbs-pillowfight latency test, when running in a cluster mode

帅比萌擦擦* 提交于 2019-12-13 00:53:24
问题 So I've started a simple test, cbs-pillowfight -h localhost -b default -i 1 -I 10000 -T Got: [10717.252368] Run +---------+---------+---------+---------+ [ 20 - 29]us |## - 257 [ 30 - 39]us |# - 106 [ 40 - 49]us |###################### - 2173 [ 50 - 59]us |################ - 1539 [ 60 - 69]us |######################################## - 3809 [ 70 - 79]us |################ - 1601 [ 80 - 89]us |## - 254 [ 90 - 99]us |# - 101 [100 - 109]us | - 43 [110 - 119]us | - 17 [120 - 129]us | - 48 [130 -

one two-directed tcp socket OR two one-directed? (linux, high volume, low latency)

和自甴很熟 提交于 2019-12-12 23:08:09
问题 I need to send (interchange) a high volume of data periodically with the lowest possible latency between 2 machines. The network is rather fast (e.g. 1Gbit or even 2G+). Os is linux. Is it be faster with using 1 tcp socket (for send and recv) or with using 2 uni-directed tcp sockets? The test for this task is very like NetPIPE network benchmark - measure latency and bandwidth for sizes from 2^1 up to 2^13 bytes, each size sent and received 3 times at least (in teal task the number of sends is

Android Low latency Audio using SoundPool

蹲街弑〆低调 提交于 2019-12-12 04:35:37
问题 I want to play a simple short tone (150ms) with as low latency as possible. Reading around it seems that the simplest solution is to use SoundPool. I've also read that in Android 4.1 support for OpenSL ES was introduced, which uses a lower latency audio output path. http://source.android.com/devices/latency_design.html So my question is does SoundPool make use of this low latency audio path? Or is the only way to access this feature via OpenSL ES and the NDK? 来源: https://stackoverflow.com

Low latency audio capture with gstreamer

∥☆過路亽.° 提交于 2019-12-10 18:15:30
问题 I need (almost) real-time audio capturing on Linux with gstreamer . My problem is that I cannot reduce the latency below ~210ms. I tried a simple loopback from mic to headphone: gst-launch-1.0 pulsesrc ! alsasink gst-launch-1.0 alsasrc ! alsasink Both produced the same delay. The latency-time property of alsasrc did not help (it did add the given latency). I could produce the effect I need with pactl load-module module-loopback latency_msec=1 But I could not figure out whether it is possible

Opening camera in multiple program in openCV

你。 提交于 2019-12-08 19:41:29
How can I open a single webcam in multiple programs written in openCV simultaneously. Btw I have attached 3 webcams and all are working fine in any single program of openCV , but why two program can't use them both, simultaneously? Is this a restriction or is there any workaround? Yes, this is an intention to restrict Why? The conceptual view is related to the hardware control layer. Operating system assumes, there are some peripherals, that can be used on-demand, but keeps their context-of-use non-share-able. As an example, one may assume a USB-mouse. While it can be used within several