OLD | NEW |
1 # -*- coding: utf-8 -*- | 1 # -*- coding: utf-8 -*- |
2 """Processing configuration classes.""" | 2 """Processing configuration classes.""" |
3 | 3 |
4 from __future__ import unicode_literals | 4 from __future__ import unicode_literals |
5 | 5 |
6 from plaso.containers import interface | 6 from plaso.containers import interface |
7 | 7 |
8 | 8 |
9 class CredentialConfiguration(interface.AttributeContainer): | 9 class CredentialConfiguration(interface.AttributeContainer): |
10 """Configuration settings for a credential. | 10 """Configuration settings for a credential. |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 return 'storage' in self.profilers | 170 return 'storage' in self.profilers |
171 | 171 |
172 def HaveProfileTaskQueue(self): | 172 def HaveProfileTaskQueue(self): |
173 """Determines if task queue profiling is configured. | 173 """Determines if task queue profiling is configured. |
174 | 174 |
175 Returns: | 175 Returns: |
176 bool: True if task queue profiling is configured. | 176 bool: True if task queue profiling is configured. |
177 """ | 177 """ |
178 return 'task_queue' in self.profilers | 178 return 'task_queue' in self.profilers |
179 | 179 |
| 180 def HaveProfileTasks(self): |
| 181 """Determines if tasks profiling is configured. |
| 182 |
| 183 Returns: |
| 184 bool: True if task queue profiling is configured. |
| 185 """ |
| 186 return 'tasks' in self.profilers |
| 187 |
180 | 188 |
181 class ProcessingConfiguration(interface.AttributeContainer): | 189 class ProcessingConfiguration(interface.AttributeContainer): |
182 """Configuration settings for processing. | 190 """Configuration settings for processing. |
183 | 191 |
184 Attributes: | 192 Attributes: |
185 credentials (list[CredentialConfiguration]): credential configurations. | 193 credentials (list[CredentialConfiguration]): credential configurations. |
186 data_location (str): path to the data files. | 194 data_location (str): path to the data files. |
187 debug_output (bool): True if debug output should be enabled. | 195 debug_output (bool): True if debug output should be enabled. |
188 event_extraction (EventExtractionConfiguration): event extraction | 196 event_extraction (EventExtractionConfiguration): event extraction |
189 configuration. | 197 configuration. |
(...skipping 18 matching lines...) Expand all Loading... |
208 self.debug_output = False | 216 self.debug_output = False |
209 self.event_extraction = EventExtractionConfiguration() | 217 self.event_extraction = EventExtractionConfiguration() |
210 self.extraction = ExtractionConfiguration() | 218 self.extraction = ExtractionConfiguration() |
211 self.filter_file = None | 219 self.filter_file = None |
212 self.input_source = InputSourceConfiguration() | 220 self.input_source = InputSourceConfiguration() |
213 self.log_filename = None | 221 self.log_filename = None |
214 self.parser_filter_expression = None | 222 self.parser_filter_expression = None |
215 self.preferred_year = None | 223 self.preferred_year = None |
216 self.profiling = ProfilingConfiguration() | 224 self.profiling = ProfilingConfiguration() |
217 self.temporary_directory = None | 225 self.temporary_directory = None |
OLD | NEW |