Fast logging to file for real time use? or ZeroMQ or similar?


#1

I want to log some metrics for my audio app so I can analyse/plot after with python. I used the Juce performanceCounter to time the fileLogger. Seems to take 30ms to 50 ms to log a small amount of text?? Apparently ZeroMQ takes a few uS so will look into that together with some python, unless there is something else I should consider?

Thanks


#2

imho if you’re going to be looking at the output from an audio process in real time you should be writing the output to an audio file. You can use the AudioFormatWriter classes to do that.

What I usually do for more granular analysis is to generate all the data offline. For example, I’ve written unit tests where in the case of failure they’ll either print data to the console (easy for copy/pasting into MATLAB) or write the signal to a text file. No fancy logging utilities required honestly.


#3

Thanks @Holy_City thats interesting. I want to generate json / XML type metrics at say 200 Hz. I wonder if this is going to pain to serialise into audio?


#4

You can write the data to a text file (or whatever you need) and then run your python as a post-build script.


#5

That’s the plan, but I’m finding the write to text process slow (30 ms - 50ms) unless I’m doing something wrong. I guess I could buffer to memory then write to file, but I don’t want to be constrained only using the app for short* durations.

*need to calculate!


#6

Devendra Parakh talks about realtime logging in his ADC talk:


#7

Devendra kindly replied

It was in the presentation (last slide, but I guess it didn’t show up in the video!):

https://goo.gl/iemidU

Thanks.
Devendra.