|
output is missing sometimes - Remote run |
companymj
|
Post subject: output is missing sometimes - Remote run |
Post rating: 0
|
Posted: Fri 04 Oct, 2013, 05:24
|
|
User rating: 0
Joined: Fri 04 Oct, 2013, 05:07 Posts: 4
|
I like Remote run very much, but it seems output are missing when using Remote run. Try the following testing code in onMessage or onTick: int i; for(i=1;i<4;i++){ console.getOut().println(i+ " || message content: " + message.getContent()); } I got : Quote: INFO 04.10.2013 04:17:57 3 || message content: null INFO 04.10.2013 04:17:57 2 || message content: null INFO 04.10.2013 04:17:57 3 || message content: null INFO 04.10.2013 04:17:57 2 || message content: null INFO 04.10.2013 04:17:57 1 || message content: null INFO 04.10.2013 04:17:57 3 || message content: null INFO 04.10.2013 04:17:57 2 || message content: null INFO 04.10.2013 04:17:57 3 || message content: null INFO 04.10.2013 04:17:57 2 || message content: null INFO 04.10.2013 04:17:57 1 || message content: null INFO 04.10.2013 04:17:57 3 || message content: null INFO 04.10.2013 04:17:57 2 || message content: null INFO 04.10.2013 04:17:57 1 || message content: null Sometimes, i=1 is missing. Is there any limitation for output in Remote run?
|
|
|
|
|
API Support
|
Post subject: Re: output is missing sometimes - Remote run |
Post rating: 0
|
Posted: Fri 04 Oct, 2013, 07:40
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
Please provide a full example strategy that replicates the case.
|
|
|
|
|
companymj
|
Post subject: Re: output is missing sometimes - Remote run |
Post rating: 0
|
Posted: Mon 07 Oct, 2013, 01:31
|
|
User rating: 0
Joined: Fri 04 Oct, 2013, 05:07 Posts: 4
|
The code I have attached is the whole strategy. It is pointless for trading, but very good for reproducing the issue. You can just copy the code in the onMessage method and the problem could be easily reproduced.
|
|
|
|
|
API Support
|
Post subject: Re: output is missing sometimes - Remote run |
Post rating: 0
|
Posted: Mon 07 Oct, 2013, 09:23
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
What do you get when using IMessage.toString()?
|
|
|
|
|
companymj
|
Post subject: Re: output is missing sometimes - Remote run |
Post rating: 0
|
Posted: Tue 08 Oct, 2013, 13:13
|
|
User rating: 0
Joined: Fri 04 Oct, 2013, 05:07 Posts: 4
|
I have changed my code to : int i; for(i=1;i<4;i++){ console.getOut().println(i+ " || message content: " + message.getContent() + " tset: to string: " + message.toString()); } and get the output Quote: INFO 08.10.2013 12:08:13 loop counter: 3 || message content: null tset: to string: MessageType : INSTRUMENT_STATUS Instument : EUR/USD Tradable : true INFO 08.10.2013 12:08:13 loop counter: 2 || message content: null tset: to string: MessageType : INSTRUMENT_STATUS Instument : EUR/USD Tradable : true INFO 08.10.2013 12:08:13 loop counter: 1 || message content: null tset: to string: MessageType : INSTRUMENT_STATUS Instument : EUR/USD Tradable : true INFO 08.10.2013 12:07:43 loop counter: 3 || message content: null tset: to string: MessageType : INSTRUMENT_STATUS Instument : AUD/USD Tradable : true INFO 08.10.2013 12:07:43 loop counter: 1 || message content: null tset: to string: MessageType : INSTRUMENT_STATUS Instument : AUD/USD Tradable : true INFO 08.10.2013 12:07:43 loop counter: 3 || message content: null tset: to string: MessageType : INSTRUMENT_STATUS Instument : EUR/USD Tradable : true INFO 08.10.2013 12:07:43 loop counter: 2 || message content: null tset: to string: MessageType : INSTRUMENT_STATUS Instument : EUR/USD Tradable : true INFO 08.10.2013 12:07:43 loop counter: 1 || message content: null tset: to string: MessageType : INSTRUMENT_STATUS Instument : EUR/USD Tradable : true INFO 08.10.2013 12:07:13 loop counter: 3 || message content: null tset: to string: MessageType : INSTRUMENT_STATUS Instument : AUD/USD Tradable : true INFO 08.10.2013 12:07:13 loop counter: 2 || message content: null tset: to string: MessageType : INSTRUMENT_STATUS Instument : AUD/USD Tradable : true INFO 08.10.2013 12:07:13 loop counter: 1 || message content: null tset: to string: MessageType : INSTRUMENT_STATUS Instument : AUD/USD Tradable : true Actually, I didn't complain the message content is null. What I am curious is console.getOut().println is missing sometimes. You can see the code is a simple loop, and will print duplicated message 3 times except the loop counter "i". So the expect result should be: loop counter 3 ***** loop counter 2 ***** loop counter 1 ***** loop counter 3 ***** loop counter 2 ***** loop counter 1 ***** ... But some rows are missing in the log. For example, there are only 5 rows at 12:07:43, one row is missing.
|
|
|
|
|
tcsabina
|
Post subject: Re: output is missing sometimes - Remote run |
Post rating: 0
|
Posted: Tue 08 Oct, 2013, 13:36
|
|
User rating: 164
Joined: Mon 08 Oct, 2012, 10:35 Posts: 676 Location: NetherlandsNetherlands
|
@support: By any chance, is this issue related to my issue, reported here? I also have a situation when a function call in onMessage() is not being executed.
|
|
|
|
|
companymj
|
Post subject: Re: output is missing sometimes - Remote run |
Post rating: 0
|
Posted: Wed 09 Oct, 2013, 02:54
|
|
User rating: 0
Joined: Fri 04 Oct, 2013, 05:07 Posts: 4
|
tcsabina wrote: @support: By any chance, is this issue related to my issue, reported here? I also have a situation when a function call in onMessage() is not being executed. I didn't go through your problem in detail(it is complex), but it looks like a different one. What I reported here is only the output missing, the functionality is fine. It happens very where, could be in onMessage, onTick, onBar.
|
|
|
|
|
API Support
|
Post subject: Re: output is missing sometimes - Remote run |
Post rating: 0
|
Posted: Wed 09 Oct, 2013, 09:18
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
tcsabina wrote: @support: By any chance, is this issue related to my issue, reported here? I also have a situation when a function call in onMessage() is not being executed. Those cases don't have anything in common.
|
|
|
|
|
API Support
|
Post subject: Re: output is missing sometimes - Remote run |
Post rating: 0
|
Posted: Fri 11 Oct, 2013, 12:20
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
Remote strategy logging has a restriction - one log record per millisecond. There are several log records in the described case in the same millisecond. That is why those logs have been skipped. Consider making log records bigger and writing them less frequently if such logging is important for you. For example: public void onMessage(IMessage message) throws JFException { int i; for (i = 1; i < 4; i++) { console.getOut().println(i+ " || message content: " + message.getContent() + " tset: to string: " + message.toString()); try { Thread.sleep(1); } catch (Throwable t) {} } } But note, that using Thread.sleep will make the strategy slower.
|
|
|
|
|
hyperscalper
|
Post subject: Re: output is missing sometimes - Remote run |
Post rating: 0
|
Posted: Fri 11 Oct, 2013, 14:52
|
|
User rating: 98
Joined: Mon 23 Jul, 2012, 02:02 Posts: 656 Location: United States, Durham, NC
|
I had also observed seemingly missing Remote Strategy log lines. Now I realize why those records were missing. Guess it's time for me to write yet another Queue object for pacing these IConsole output lines..... HyperScalper
|
|
|
|
|
|
Pages: [
1
]
|
|
|
|
|