Adds an analysis process status table row.

    Args:
      process_status (ProcessStatus): processing status.
      table_view (CLITabularTableView): table view.
356972
def _AddsAnalysisProcessStatusTableRow(self, process_status, table_view):
    
    used_memory = self._FormatSizeInUnitsOf1024(process_status.used_memory)

    events = ''
    if (process_status.number_of_consumed_events is not None and
        process_status.number_of_consumed_events_delta is not None):
      events = '{0:d} ({1:d})'.format(
          process_status.number_of_consumed_events,
          process_status.number_of_consumed_events_delta)

    event_tags = ''
    if (process_status.number_of_produced_event_tags is not None and
        process_status.number_of_produced_event_tags_delta is not None):
      event_tags = '{0:d} ({1:d})'.format(
          process_status.number_of_produced_event_tags,
          process_status.number_of_produced_event_tags_delta)

    reports = ''
    if (process_status.number_of_produced_reports is not None and
        process_status.number_of_produced_reports_delta is not None):
      reports = '{0:d} ({1:d})'.format(
          process_status.number_of_produced_reports,
          process_status.number_of_produced_reports_delta)

    table_view.AddRow([
        process_status.identifier, process_status.pid, process_status.status,
        used_memory, events, event_tags, reports])
17916
def _PrintAnalysisStatusUpdateLinear(self, processing_status):
    
    for worker_status in processing_status.workers_status:
      status_line = (
          '{0:s} (PID: {1:d}) - events consumed: {2:d} - running: '
          '{3!s}\n').format(
              worker_status.identifier, worker_status.pid,
              worker_status.number_of_consumed_events,
              worker_status.status not in definitions.ERROR_STATUS_INDICATORS)
      self._output_writer.Write(status_line)
811079
def pre_process(self):
        
        LOGGER.info('ANALYSIS : Pre processing')

        for pre_processor in self._preprocessors:
            layer = pre_processor['process']['function'](self)
            purpose = pre_processor['output'].get('value')['key']
            save_style = pre_processor['output'].get('save_style', False)
            result, name = self.datastore.add_layer(layer, purpose, save_style)
            if not result:
                raise Exception(
                    tr('Something went wrong with the datastore : '
                       '{error_message}').format(error_message=name))
            layer = self.datastore.layer(name)
            self._preprocessors_layers[purpose] = layer
            self.debug_layer(layer, add_to_datastore=False)

            self.set_state_process('pre_processor', pre_processor['name'])
            LOGGER.info('{name} : Running'.format(name=pre_processor['name']))
264550
def add_status_code(code):
    
    def class_decorator(cls):
        """内部装饰函数,用于将异常类注册到对应的状态码.

        Parameters:
            cls (Callable): - 要注册的异常类
        Return:
            (Callable): - 注册的异常类

        """
        cls.status_code = code
        _mprpc_exceptions[code] = cls
        return cls

    return class_decorator
1235152
def status():
    ''''''
    with Session() as session:
        resp = session.Manager.status()
        print(tabulate([('Status', 'Active Sessions'),
                        (resp['status'], resp['active_sessions'])],
                       headers='firstrow'))
669974
def report_device_status(self, mode):
        
        if mode == 5:    # Request for terminal status.
            self.write_process_input(ctrl.CSI + "0n")
        elif mode == 6:  # Request for cursor position.
            x = self.cursor.x + 1
            y = self.cursor.y + 1

            # "Origin mode (DECOM) selects line numbering."
            if mo.DECOM in self.mode:
                y -= self.margins.top
            self.write_process_input(ctrl.CSI + "{0};{1}R".format(y, x))
698053
def add_status_line(self, label):
        
        status_line = StatusBar(label,
                                self._sep_start, self._sep_end,
                                self._fill_char)
        self._lines.append(status_line)
        return status_line
854507
def _PrintExtractionStatusUpdateLinear(self, processing_status):
    
    for worker_status in processing_status.workers_status:
      status_line = (
          '{0:s} (PID: {1:d}) - events produced: {2:d} - file: {3:s} '
          '- running: {4!s}\n').format(
              worker_status.identifier, worker_status.pid,
              worker_status.number_of_produced_events,
              worker_status.display_name,
              worker_status.status not in definitions.ERROR_STATUS_INDICATORS)
      self._output_writer.Write(status_line)
441073
def _process_status(self, status):
        
        self._screen_id = status.get(ATTR_SCREEN_ID)
        self.status_update_event.set()
1222650
public void addAnalyzer(CmsSearchAnalyzer analyzer) {

        m_analyzers.put(analyzer.getLocale(), analyzer);

        if (CmsLog.INIT.isInfoEnabled()) {
            CmsLog.INIT.info(
                Messages.get().getBundle().key(
                    Messages.INIT_ADD_ANALYZER_2,
                    analyzer.getLocale(),
                    analyzer.getClassName()));
        }
    }
1069661
def _add_column(self, p_view, p_pos=None):
        
        def execute_silent(p_cmd, p_todo_id=None):
            self._execute_handler(p_cmd, p_todo_id, lambda _: None)

        todolist = TodoListWidget(p_view, p_view.data['title'], self.keymap)
        urwid.connect_signal(todolist, 'execute_command_silent',
                             execute_silent)
        urwid.connect_signal(todolist, 'execute_command', self._execute_handler)
        urwid.connect_signal(todolist, 'repeat_cmd', self._repeat_last_cmd)
        urwid.connect_signal(todolist, 'refresh', self.mainloop.screen.clear)
        urwid.connect_signal(todolist, 'add_pending_action', self._set_alarm)
        urwid.connect_signal(todolist, 'remove_pending_action', self._remove_alarm)
        urwid.connect_signal(todolist, 'column_action', self._column_action_handler)
        urwid.connect_signal(todolist, 'show_keystate', self._print_keystate)
        urwid.connect_signal(todolist, 'toggle_mark',
                             self._process_mark_toggle)

        options = self.columns.options(
            width_type='given',
            width_amount=config().column_width(),
            box_widget=True
        )

        item = (todolist, options)

        if p_pos == None:
            p_pos = len(self.columns.contents)

        self.columns.contents.insert(p_pos, item)

        self.columns.focus_position = p_pos
        self._blur_commandline()
325953
def addAnalyses(self, analyses):
        
        actions_pool = ActionHandlerPool.get_instance()
        actions_pool.queue_pool()
        for analysis in analyses:
            self.addAnalysis(api.get_object(analysis))
        actions_pool.resume()
605727
def set_status(self, new_status):
        '''
        
        '''
        if new_status not in Report.allowed_statuses:
            raise Exception('status must be one of: %s' % (', '.join(Report.allowed_statuses)))
        self._data_fields['status'] = new_status.lower()
789562
def new_cast_status(self, status):
        
        self.status = status
        if status:
            self.status_event.set()
1209970
function procStat( proc, callback ){
    var type = isNumber( proc ) ? 'PID' : 'IMAGENAME',
        arg = '/fi \"' + type + ' eq ' + proc + '\" /fo CSV',
        row = null,
        processes = {
            array: [],
            object: []
        };

    taskList( arg, function( err, stdout ){
        csv.parse( stdout, function( err, rows ){
            if ( rows.length > 0 ){
                for ( var i = 1; i < rows.length; i++ ){
                    row = rows[ i ];

                    processes.array.push( row );
                    processes.object.push({
                        name: row[ 0 ],
                        pid: row[ 1 ],
                        sessionName: row[ 2 ],
                        sessionNumber: row[ 3 ],
                        memUsage: row[ 4 ]
                    })
                }
            } else {
                var noun = isNumber( proc ) ? 'PIDs' : 'process names';
                err = new Error( 'There were no ' + noun + ' found when searching for \"' + proc + '\"' )
            }

            callback( err, processes )
        })
    })
}
350613
def AddAnalysisReport(self, analysis_report):
    
    self._RaiseIfNotWritable()

    self._storage_file.AddAnalysisReport(analysis_report)

    report_identifier = analysis_report.plugin_name
    self._session.analysis_reports_counter['total'] += 1
    self._session.analysis_reports_counter[report_identifier] += 1
    self.number_of_analysis_reports += 1
429987
def __store_processing_state(self):
        

        steps = self.Application_Progress_Status_processing.Processing_progressBar.maximum()
        value = self.Application_Progress_Status_processing.Processing_progressBar.value()
        message = self.Application_Progress_Status_processing.Processing_label.text()
        state = self.__is_processing

        self.__processing_state = steps, value, message, state