You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Cool package!
Can you suggest the most efficient way to clear line content that has been left from previous outputs please?
I am believing that (in this case) it is more efficient for me to use newline characters rather than jump around from line to line with Jetty.
This needs to keep up with a very fast message queue and I want to add the least amount of overhead to the program.
Maybe I am not understanding clearLine(), but it does not seem to work to clear the line if I included it before or after the line output.
// Clear the screenjetty.clear();jetty.moveTo([0,0]);jetty.text("Stats for Kafka Topic '"+consumer_topic+"'");consumer.on('message',function(message){total_bytes+=message.value.length;count++;avg_size=total_bytes/count;jetty.moveTo([1,0]);jetty.text('total_messages: '.concat(numeral(count,'0 a'))+'\navg_msg_size: '.concat(numeral(avg_size).format('0.00 b'))+'\ntotal_msg_volume: '.concat(numeral(total_bytes).format('0.00 b'))+'\n');jetty.clearLine();});
This always yields something like this (below) once the line content has changed in length (and you see at one point the KB was the unit of measure and now switched to MB). I want to get rid of the last line output overflow (without having to keep track of last line length and padding with spaces or something).
Stats for Kafka Topic 'sentences'total_messages: 43927avg_msg_size: 353.76 Btotal_msg_volume: 14.82 MBKB
The text was updated successfully, but these errors were encountered:
Cool package!
Can you suggest the most efficient way to clear line content that has been left from previous outputs please?
I am believing that (in this case) it is more efficient for me to use newline characters rather than jump around from line to line with Jetty.
This needs to keep up with a very fast message queue and I want to add the least amount of overhead to the program.
Maybe I am not understanding clearLine(), but it does not seem to work to clear the line if I included it before or after the line output.
This always yields something like this (below) once the line content has changed in length (and you see at one point the KB was the unit of measure and now switched to MB). I want to get rid of the last line output overflow (without having to keep track of last line length and padding with spaces or something).
The text was updated successfully, but these errors were encountered: