src/tools/benchmark_tool/benchmark_tool/output_formatter/generic_stream_formatter.py
def _handle_callback(self, msg):
        """
        Save the received metric into a file, one value for each line.

        Callback for the metric topic.

        @param msg: Message containing the int value
        @type  msg: Depends on the topic
        @return: None
        """
        # create or open path and filename for the output file
        # the format is: <root_path>/<result_folder>/<result_file_name>.txt
        file_name = os.path.join(self._result_path,
                                 self._result_file_name)
        try:
            # Create the file or append
            file = open(file_name, "a")

            # Write the message content
            file.write(str(msg.data) + "\n")

            # Close the file
            file.close()
        except Exception as e:
            error(self.node, "%s" % str(e))

        Save the received metric into a file, one value for each line.

        Callback for the metric topic.

        @param msg: Message containing the int value
        @type  msg: Depends on the topic
        @return: None
        
Save the received metric into a file, one value for each line.
Callback for the metric topic.
Save the received metric into a file one value for each line . Callback for the metric topic .
def _handle_callback(self, msg):
        file_name = os.path.join(self._result_path,
                                 self._result_file_name)
        try:
            file = open(file_name, "a")
            file.write(str(msg.data) + "\n")
            file.close()
        except Exception as e:
            error(self.node, "%s" % str(e))
def _handle_callback ( self , msg ) : file_name = os . path . join ( self . _result_path , self . _result_file_name ) try : file = open ( file_name , "a" ) file . write ( str ( msg . data ) + "\n" ) file . close ( ) except Exception as e : error ( self . node , "%s" % str ( e ) )
Save the received metric into a file, one value for each line.
Save the received metric into a file one value for each line .
"""
        Save the received metric into a file, one value for each line.

        Callback for the metric topic.

        @param msg: Message containing the int value
        @type  msg: Depends on the topic
        @return: None
        """ # create or open path and filename for the output file # the format is: <root_path>/<result_folder>/<result_file_name>.txt # Create the file or append # Write the message content # Close the file
None
self
msg
Message containing the int value
Message containing the int value