Wrapper file stopped logging during benchmarking? when in general it will stop?

Hi
I just noticed that wrapper file stopped logging (i checked its size was 0) so i went to system logs and got a hint that my benchmarking code probably caused an issue so i removed it and wrapper is happy again.
1 Do you know when in general wrapper file will stop logging? are system logs the only way to get a clue to debug?
2 I am checking potentially long running scripts triggered cyclically from the gateway using code below - can you see any reason it could cause the issue? I remember nano time is a lot more consistent and @pturmel mentioned in the past.

from java.lang import System

start = System.nanotime()

your code

end = System.nanotime()
print 'Took {} nanosecodes'.format(end-start)

Don't use print. Use a logger instance with .debugf(...) and set the DEBUG level when you need it.

The wrapper will rotate to new log files if configured to do so, based on time or size. I recommend the latter. Ensure there's enough room for that size times the number to keep.

1 Like

loggers work beautifully - is there space limit somewhere in the config how big internal database can grow?
can you please advise where to find reference information on System.nanotime() - i noticed i had to correct it to System.nanoTime() - is it part of SDK documentation?

i also noticed that when the function runs as gateway cyclic event it takes about 100ms (bad database code) but when i run the same function from script console it takes about 300ms - any idea why is that so different and how the code executes diferently?

It is part of java itself.

2 Likes

When you run from the script console, there is extra traffic: designer=>gateway, gateway=>DB, DB=>gateway, gateway=>designer. The latter two carry the result set. If it is big, encoding and compressing will be significant.

2 Likes