Extract query pattern from operations.
(self)
| 517 | |
| 518 | @property |
| 519 | def command(self): |
| 520 | """Extract query pattern from operations.""" |
| 521 | if not self._command_calculated: |
| 522 | |
| 523 | self._command_calculated = True |
| 524 | if self.operation == 'command': |
| 525 | try: |
| 526 | command_idx = self.split_tokens.index('command:') |
| 527 | command = self.split_tokens[command_idx + 1] |
| 528 | if command == '{': |
| 529 | # workaround for <= 2.2 log files, |
| 530 | # where command was not listed separately |
| 531 | command = self.split_tokens[command_idx + 2][:-1] |
| 532 | self._command = command.lower() |
| 533 | except ValueError: |
| 534 | pass |
| 535 | |
| 536 | return self._command |
| 537 | |
| 538 | @property |
| 539 | def nscanned(self): |
no outgoing calls