Вверх ↑
Ответов: 70
Рейтинг: 1
#1: 2021-07-29 17:42:29 ЛС | профиль | цитата
Gunta,Работает, прошу прошение за вои кривые ручки.
Шустрый однако websocat_win32.exe Доходило до 786 строк данных в секунду ( при получении данных сразу по несколько пар монет без отрисовки данных на графике. )

Но вот стоило подключить компонент Plotter, как все менялось в худшую сторону.

Вот скрин работы двух одинаковых сем одна с подключённым компонентом Plotter другая без, две эти схемы проработали ровно 5 мин. ( на скрине видно, что Plotter явно не поспевает за полученными данными )

Обратите внимание на время в схемах и на время пк.


Снимок.PNG
[img][/img]
Вот схемы которые я сравнивал.

1)
Add(MainForm,7714850,42,98){
Width=1062
Height=542
Caption="trade"
Point(onClose)
link(onCreate,10289546:doEvent1,[])
link(onClose,133730:doConsoleTerminate,[(81,125)(81,132)])
}
Add(DateConvertor,15786644,819,119)
{
Mode=16
Point(Result)
link(onResult,7728186:doText,[])
}
Add(Label,7728186,868,119)
{
Width=1046
Height=35
Align=2
Font=[Lucida Console,20,0,0,204]
Caption=""
AutoSize=1
Alignment=2
}
Add(BlockFind,2689203,322,112)
{
IncludeBlock=1
StartBlock="{"
EndBlock="}"
link(onSearch,15154005:doEvent1,[(373,118)(373,125)])
}
Add(Math,2921107,714,119)
{
OpType=3
Op2=1000
link(onResult,12878153:doOperation,[])
}
Add(Case,1283714,714,168)
{
link(onNextCase,9339927:doCompare,[])
}
Add(WinExec,133730,140,105)
{
Param="wss://stream.binance.com:9443/stream?streams=btcusdt@trade/xrpusdt@trade/ethusdt@trade/busdusdt@trade/axsusdt@trade/aliceusdt@trade/bnbusdt@trade/dotusdt@trade/dogeusdt@trade/adausdt@trade/tlmusdt@trade/runeusdt@trade/lunausdt@trade/usdcusdt@trade/maticusdt@trade"
FileName="websocat_win32.exe"
Mode=0
Point(doConsoleExec)
Point(doConsoleTerminate)
Point(onConsoleResult)
Point(doConsoleInput)
Point(onConsoleError)
Point(onConsoleTerminate)
link(onConsoleResult,8287468:doEvent1,[])
}
Add(MultiStrData,14740655,588,119)
{
Char=","
From=1
Count=6
link(onPart1,8507035:doSplit,[])
}
Add(StrPart,8507035,665,119)
{
Char=":"
link(onSplit,2921107:doOperation,[])
}
Add(StrPart,9913632,665,168)
{
Char=":"
link(onSplit,1283714:doCase,[])
}
Add(Plotter,4825959,539,42)
{
Top=35
Width=1046
Height=338
Align=5
Name="Plot"
LeftMargin=50
MouseControl=1
}
Add(If_else,9339927,763,168)
{
Type=4
Op2=Integer(1)
link(onTrue,5815444:doEvent1,[])
}
Add(Hub,7308410,546,119)
{
OutCount=4
link(onEvent1,14740655:doSplit,[])
link(onEvent2,8339777:doEnum,[(612,132)(612,377)])
}
Add(Str_Enum,8339777,665,371)
{
Delimiter=","
link(onEnum,3396544:doOperation,[])
}
Add(MST_RowAction,3397609,868,357)
{
Action=2
MSTControl="asd"
Point(Index)
}
Add(MT_String,2667156,763,357)
{
Delimeter=":"
link(onResult,10979704:doAdd,[])
link(Str1,8339777:Part,[(769,348)(755,348)(755,418)(678,418)])
}
Add(Hub,10289546,98,112)
{
link(onEvent1,7144214:doFor,[(123,118)(123,62)])
link(onEvent2,133730:doConsoleExec,[])
}
Add(MST_RowAction,1436905,189,56)
{
MSTControl="asd"
}
Add(For,7144214,140,56)
{
End=10
link(onEvent,1436905:doRowAction,[])
}
Add(MT_Add,10979704,819,357)
{
InputMT=1
link(onAdd,3397609:doRowAction,[])
link(Data,3396544:Result,[(825,348)(811,348)(811,411)(720,411)])
}
Add(Math,3396544,714,371)
{
OpType=1
Op2=1
link(onResult,2667156:doMTString,[])
link(Op1,8339777:NumSubStr,[(720,362)(706,362)(706,411)(671,411)])
}
Add(Replace,5437590,224,112)
{
SubStr="""
link(onReplace,13454937:doSearch,[])
}
Add(BlockFind,13454937,273,112)
{
StartBlock="{e:trade"
EndBlock="true}"
link(onSearch,2689203:doSearch,[])
}
Add(Math,12878153,763,119)
{
Op2=10800
link(onResult,15786644:doConvert,[])
}
Add(PlotLines,15557708,868,168)
{
Grapher="Plot"
Color=16711680
Step=1
Name="base"
}
Add(PlotHistogram,9391493,763,287)
{
Grapher="Plot2"
Color=16776960
Step=1
BgColor=16776960
Offset=1
Axis="X0"
}
Add(Plotter,7412765,588,42)
{
Top=373
Width=1046
Height=130
Align=4
Name="Plot2"
LeftMargin=50
MouseControl=1
}
Add(Case,4763561,714,287)
{
link(onNextCase,9391493:doAdd,[])
}
Add(StrPart,12293705,665,287)
{
Char=":"
link(onSplit,4763561:doCase,[])
}
Add(MTStrTbl,116350,693,42)
{
Left=55
Top=55
Width=155
Height=163
Color=-16777201
Ctl3D=1
Name="asd"
Columns=#4:1=30|5:2=120|
Style=4
Grid=0
DrawManager="dsa"
}
Add(PlotAxis,16365127,868,287)
{
Grapher="Plot2"
Name="X0"
Color=16711680
Style=1
}
Add(LinkTip,9547046,49,259)
{
Link="https://github.com/vi/websocat"
Font=[MS Sans Serif,8,0,16711680,1]
}
Add(Hub,5815444,819,168)
{
link(onEvent1,15557708:doAdd,[])
link(onEvent2,15485904:doOperation,[(844,181)(844,223)(655,223)(655,237)])
}
Add(Math,15485904,665,231)
{
OpType=2
Op2=100
link(onResult,13648928:doCalcDelta,[])
}
Add(SampleDelta,13648928,714,231)
{
link(onCalcDelta,6805806:doAdd,[])
}
Add(Plotter,3246690,644,42)
{
Top=373
Width=1046
Height=130
Align=4
Name="Plot3"
LeftMargin=50
MouseControl=1
}
Add(PlotHistogram,6805806,763,231)
{
Grapher="Plot3"
Color=16711680
Step=1
BgColor=16711680
Offset=1
Axis="X0"
}
Add(PlotAxis,10952898,868,231)
{
Grapher="Plot3"
Name="X1"
Color=16711680
Style=1
}
Add(Memory,6805360,672,462)
{
link(onData,15578308:doValue,[])
}
Add(MathParse,15797740,665,525)
{
MathStr="1 + %2"
link(onResult,6805360:doValue,[(728,531)(728,499)(660,499)(660,468)])
link(X2,6805360:Value,[])
}
Add(Timer,13915431,511,581)
{
link(onTimer,8736944:doEvent1,[])
}
Add(Edit,1781743,784,581)
{
Left=115
Top=5
link(Str,5608187:Var2,[])
}
Add(Hub,8736944,609,581)
{
OutCount=4
link(onEvent1,1781743:doText,[])
link(onEvent3,290290:doCompare,[(665,601)(665,643)])
link(onEvent4,6805360:doClear,[(647,608)(647,475)])
}
Add(If_else,290290,707,637)
{
Type=2
link(onFalse,5642669:doValue,[(751,650)(751,622)(695,622)(695,594)])
link(Op1,5642669:Value,[])
link(Op2,5608187:Var1,[(720,558)])
}
Add(GetDataEx,5608187,784,553)
{
link(Data,8834749:Var2,[])
}
Add(Memory,5642669,707,588)
{
Point(Data)
link(onData,1640941:doText,[])
link(Data,8834749:Var1,[(713,516)])
}
Add(GetDataEx,8834749,784,511)
{
link(Data,15578308:Value,[])
}
Add(Edit,1640941,853,588)
{
Left=215
Top=5
}
Add(Hub,15154005,392,119)
{
OutCount=3
link(onEvent1,7308410:doEvent1,[])
link(onEvent3,15797740:doCalc,[(536,139)(536,531)])
}
Add(Label,2961824,398,49)
{
Left=180
Top=5
Width=35
Height=20
Font=[MS Sans Serif,10,1,0,1]
Caption="MAX"
}
Add(Label,8719720,343,56)
{
Left=80
Top=5
Width=31
Height=20
Font=[MS Sans Serif,10,1,0,1]
Caption="Sec"
}
Add(Hub,8287468,182,112)
{
link(onEvent1,5437590:doReplace,[])
}
Add(Memory,15578308,784,462)
{
}




2)
Add(MainForm,7714850,42,98)
{
Width=1062
Height=542
Caption="trade"
Point(onClose)
link(onCreate,10289546:doEvent1,[])
link(onClose,133730:doConsoleTerminate,[(81,125)(81,132)])
}
Add(DateConvertor,15786644,819,119)
{
Mode=16
Point(Result)
link(onResult,7728186:doText,[])
}
Add(Label,7728186,868,119)
{
Width=1046
Height=35
Align=2
Font=[Lucida Console,20,0,0,204]
Caption=""
AutoSize=1
Alignment=2
}
Add(BlockFind,2689203,287,119)
{
IncludeBlock=1
StartBlock="{"
EndBlock="}"
link(onSearch,15154005:doEvent1,[])
}
Add(Math,2921107,714,119)
{
OpType=3
Op2=1000
link(onResult,12878153:doOperation,[])
}
Add(Case,1283714,714,168)
{
link(onNextCase,9339927:doCompare,[])
}
Add(WinExec,133730,140,105)
{
Param="wss://stream.binance.com:9443/stream?streams=btcusdt@trade/xrpusdt@trade/ethusdt@trade/busdusdt@trade/axsusdt@trade/aliceusdt@trade/bnbusdt@trade/dotusdt@trade/dogeusdt@trade/adausdt@trade/tlmusdt@trade/runeusdt@trade/lunausdt@trade/usdcusdt@trade/maticusdt@trade"
FileName="websocat_win32.exe"
Mode=0
Point(doConsoleExec)
Point(doConsoleTerminate)
Point(onConsoleResult)
Point(doConsoleInput)
Point(onConsoleError)
Point(onConsoleTerminate)
link(onConsoleResult,5437590:doReplace,[(180,118)(180,125)])
}
Add(MultiStrData,14740655,588,119)
{
Char=","
From=1
Count=6
link(onPart1,8507035:doSplit,[])
link(onPart4,9913632:doSplit,[(655,146)(655,174)])
link(onPart5,12293705:doSplit,[(648,153)(648,293)])
}
Add(StrPart,8507035,665,119)
{
Char=":"
link(onSplit,2921107:doOperation,[])
}
Add(StrPart,9913632,665,168)
{
Char=":"
link(onSplit,1283714:doCase,[])
}
Add(Plotter,4825959,539,42)
{
Top=35
Width=1046
Height=208
Align=5
Name="Plot"
LeftMargin=50
MouseControl=1
}
Add(If_else,9339927,763,168)
{
Type=4
Op2=Integer(1)
link(onTrue,5815444:doEvent1,[])
}
Add(Hub,7308410,546,119)
{
OutCount=4
link(onEvent1,14740655:doSplit,[])
link(onEvent2,8339777:doEnum,[(612,132)(612,377)])
link(onEvent3,15797740:doCalc,[(612,139)(612,531)])
}
Add(Str_Enum,8339777,665,371)
{
Delimiter=","
link(onEnum,3396544:doOperation,[])
}
Add(MST_RowAction,3397609,868,357)
{
Action=2
MSTControl="asd"
Point(Index)
}
Add(MT_String,2667156,763,357)
{
Delimeter=":"
link(onResult,10979704:doAdd,[])
link(Str1,8339777:Part,[(769,348)(755,348)(755,418)(678,418)])
}
Add(Hub,10289546,98,112)
{
link(onEvent1,7144214:doFor,[(123,118)(123,62)])
link(onEvent2,133730:doConsoleExec,[])
}
Add(MST_RowAction,1436905,189,56)
{
MSTControl="asd"
}
Add(For,7144214,140,56)
{
End=10
link(onEvent,1436905:doRowAction,[])
}
Add(MT_Add,10979704,819,357)
{
InputMT=1
link(onAdd,3397609:doRowAction,[])
link(Data,3396544:Result,[(825,348)(811,348)(811,411)(720,411)])
}
Add(Math,3396544,714,371)
{
OpType=1
Op2=1
link(onResult,2667156:doMTString,[])
link(Op1,8339777:NumSubStr,[(720,362)(706,362)(706,411)(671,411)])
}
Add(Replace,5437590,189,119)
{
SubStr="""
link(onReplace,13454937:doSearch,[])
}
Add(BlockFind,13454937,238,119)
{
StartBlock="{e:trade"
EndBlock="true}"
link(onSearch,2689203:doSearch,[])
}
Add(Math,12878153,763,119)
{
Op2=10800
link(onResult,15786644:doConvert,[])
}
Add(PlotLines,15557708,868,168)
{
Grapher="Plot"
Color=16711680
Step=1
Name="base"
}
Add(PlotHistogram,9391493,763,287)
{
Grapher="Plot2"
Color=16776960
Step=1
BgColor=16776960
Offset=1
Axis="X0"
}
Add(Plotter,7412765,588,42)
{
Top=373
Width=1046
Height=130
Align=4
Name="Plot2"
LeftMargin=50
MouseControl=1
}
Add(Case,4763561,714,287)
{
link(onNextCase,9391493:doAdd,[])
}
Add(StrPart,12293705,665,287)
{
Char=":"
link(onSplit,4763561:doCase,[])
}
Add(MTStrTbl,116350,693,42)
{
Left=55
Top=55
Width=155
Height=163
Color=-16777201
Ctl3D=1
Name="asd"
Columns=#4:1=30|5:2=120|
Style=4
Grid=0
DrawManager="dsa"
}
Add(PlotAxis,16365127,868,287)
{
Grapher="Plot2"
Name="X0"
Color=16711680
Style=1
}
Add(LinkTip,9547046,49,259)
{
Link="https://github.com/vi/websocat"
Font=[MS Sans Serif,8,0,16711680,1]
}
Add(Hub,5815444,819,168)
{
link(onEvent1,15557708:doAdd,[])
link(onEvent2,15485904:doOperation,[(844,181)(844,223)(655,223)(655,237)])
}
Add(Math,15485904,665,231)
{
OpType=2
Op2=100
link(onResult,13648928:doCalcDelta,[])
}
Add(SampleDelta,13648928,714,231)
{
link(onCalcDelta,6805806:doAdd,[])
}
Add(Plotter,3246690,644,42)
{
Top=373
Width=1046
Height=130
Align=4
Name="Plot3"
LeftMargin=50
MouseControl=1
}
Add(PlotHistogram,6805806,763,231)
{
Grapher="Plot3"
Color=16711680
Step=1
BgColor=16711680
Offset=1
Axis="X0"
}
Add(PlotAxis,10952898,868,231)
{
Grapher="Plot3"
Name="X1"
Color=16711680
Style=1
}
Add(WinExec,8475440,98,322)
{
Param="wss://stream.binance.com:9443/stream?streams=btcusdt@trade"
FileName="websocat_win32.exe"
Mode=0
Point(doConsoleExec)
Point(doConsoleTerminate)
Point(onConsoleResult)
Point(doConsoleInput)
Point(onConsoleError)
Point(onConsoleTerminate)
}
Add(Memory,6805360,672,462)
{
link(onData,15578308:doValue,[])
}
Add(MathParse,15797740,665,525)
{
MathStr="1 + %2"
link(onResult,6805360:doValue,[(728,531)(728,499)(660,499)(660,468)])
link(X2,6805360:Value,[])
}
Add(Timer,13915431,553,581)
{
link(onTimer,8736944:doEvent1,[])
}
Add(Edit,1781743,784,581)
{
Left=125
Top=5
link(Str,5608187:Var2,[])
}
Add(Hub,8736944,609,581)
{
OutCount=4
link(onEvent1,1781743:doText,[])
link(onEvent3,290290:doCompare,[(665,601)(665,643)])
link(onEvent4,6805360:doClear,[(647,608)(647,475)])
}
Add(If_else,290290,707,637)
{
Type=2
link(onFalse,5642669:doValue,[(751,650)(751,622)(695,622)(695,594)])
link(Op1,5642669:Value,[])
link(Op2,5608187:Var1,[(720,558)])
}
Add(GetDataEx,5608187,784,553)
{
link(Data,8834749:Var2,[])
}
Add(Memory,5642669,707,588)
{
Point(Data)
link(onData,1640941:doText,[])
link(Data,8834749:Var1,[(713,516)])
}
Add(GetDataEx,8834749,784,511)
{
link(Data,15578308:Value,[])
}
Add(Edit,1640941,854,588)
{
Left=230
Top=5
}
Add(Hub,15154005,392,119)
{
link(onEvent1,7308410:doEvent1,[])
}
Add(Label,2961824,399,56)
{
Left=190
Top=5
Width=35
Height=20
Font=[MS Sans Serif,10,1,0,1]
Caption="MAX"
}
Add(Label,8719720,469,70)
{
Left=80
Top=5
Width=31
Height=20
Font=[MS Sans Serif,10,1,0,1]
Caption="Sec"
}
Add(Memory,15578308,784,462)
{
}

карма: 1

0
Редактировалось 9 раз(а), последний 2021-07-29 17:50:28