Exemplo n.º 1
0
 def test_1_thread_per_core_long_format(self):
     """thread instead of threads per core"""
     line = "INFO  [main] 2018-01-09 10:12:11,864  DseConfig.java:448 - This instance appears to have 1 thread per CPU core and 8 total CPU threads."
     fields = outputlog.capture_line(line)
     self.assertIsNotNone(fields)
     self.assertEqual(fields["threads_per_core"], 1)
     self.assertEqual(fields["cpu_cores"], 8)
Exemplo n.º 2
0
 def test_parse_1_thread_per_core_short_format(self):
     """validates the threads per core log format"""
     line = "INFO  01:06:12,474  This instance appears to have 1 thread per CPU core and 8 total CPU threads."
     fields = outputlog.capture_line(line)
     self.assertIsNotNone(fields)
     self.assertEqual(fields["threads_per_core"], 1)
     self.assertEqual(fields["cpu_cores"], 8)
Exemplo n.º 3
0
def test_1_thread_per_core_long_format():
    """thread instead of threads per core"""
    line = "INFO  [main] 2018-01-09 10:12:11,864  DseConfig.java:448 - This instance appears to have 1 thread per CPU core and 8 total CPU threads."
    fields = outputlog.capture_line(line)
    assert fields
    assert fields['threads_per_core'] == 1
    assert fields['cpu_cores'] == 8
Exemplo n.º 4
0
 def test_parse_threads_per_core(self):
     """validates the threads per core log format"""
     line = "INFO  [main] 2017-01-11 12:19:06,187  DseConfig.java:455 - This instance appears to have 2 threads per CPU core and 16 total CPU threads."
     fields = outputlog.capture_line(line)
     self.assertIsNotNone(fields)
     self.assertEqual(fields["threads_per_core"], 2)
     self.assertEqual(fields["cpu_cores"], 16)
Exemplo n.º 5
0
 def test_parse_disk_access_mode_48(self):
     """validate the 4.8 modes are handled correctly"""
     line = "INFO 10:13:16,088  DiskAccessMode 'auto' determined to be mmap, indexAccessMode is mmap"
     fields = outputlog.capture_line(line)
     self.assertIsNotNone(fields)
     self.assertEqual(fields["logged_disk_access_mode"], "mmap")
     self.assertEqual(fields["logged_index_access_mode"], "mmap")
Exemplo n.º 6
0
def test_parse_1_thread_per_core_short_format():
    """validates the threads per core log format"""
    line = "INFO  01:06:12,474  This instance appears to have 1 thread per CPU core and 8 total CPU threads."
    fields = outputlog.capture_line(line)
    assert fields
    assert fields['threads_per_core'] == 1
    assert fields['cpu_cores'] == 8
Exemplo n.º 7
0
def test_parse_threads_per_core():
    """validates the threads per core log format"""
    line = "INFO  [main] 2017-01-11 12:19:06,187  DseConfig.java:455 - This instance appears to have 2 threads per CPU core and 16 total CPU threads."
    fields = outputlog.capture_line(line)
    assert fields
    assert fields['threads_per_core'] == 2
    assert fields['cpu_cores'] == 16
Exemplo n.º 8
0
def test_parse_disk_access_mode_48():
    """validate the 4.8 modes are handled correctly"""
    line = "INFO 10:13:16,088  DiskAccessMode 'auto' determined to be mmap, indexAccessMode is mmap"
    fields = outputlog.capture_line(line)
    assert fields
    assert fields['logged_disk_access_mode'] == 'mmap'
    assert fields['logged_index_access_mode'] == 'mmap'
Exemplo n.º 9
0
 def test_parse_disk_access_mode_50(self):
     """validate the 5.0 modes are handled correctly"""
     line = "INFO 11:15:02,584 DatabaseDescriptor.java:320 - DiskAccessMode 'auto' determined to be mmap, indexAccessMode is mmap"
     fields = outputlog.capture_line(line)
     self.assertIsNotNone(fields)
     self.assertEqual(fields["logged_disk_access_mode"], "mmap")
     self.assertEqual(fields["logged_index_access_mode"], "mmap")
     line = "INFO 11:12:24,303 DatabaseDescriptor.java:326 - DiskAccessMode is standard, indexAccessMode is mmap"
     fields = outputlog.capture_line(line)
     self.assertIsNotNone(fields)
     self.assertEqual(fields["logged_disk_access_mode"], "standard")
     self.assertEqual(fields["logged_index_access_mode"], "mmap")
     line = "INFO 11:13:34,429 DatabaseDescriptor.java:331 - DiskAccessMode is standard, indexAccessMode is standard"
     fields = outputlog.capture_line(line)
     self.assertIsNotNone(fields)
     self.assertEqual(fields["logged_disk_access_mode"], "standard")
     self.assertEqual(fields["logged_index_access_mode"], "standard")
Exemplo n.º 10
0
def test_parse_disk_access_mode_51():
    """validates 5.1 parses correctly"""
    line = "INFO [main] 2018-01-09 12:18:13,157 DatabaseDescriptor.java:374 - " + \
            "DiskAccessMode is standard, indexAccessMode is mmap"
    fields = outputlog.capture_line(line)
    assert fields
    assert fields['logged_disk_access_mode'] == 'standard'
    assert fields['logged_index_access_mode'] == 'mmap'
Exemplo n.º 11
0
def test_parse_disk_access_mode_50():
    """validate the 5.0 modes are handled correctly"""
    line = "INFO 11:15:02,584 DatabaseDescriptor.java:320 - DiskAccessMode 'auto' determined to be mmap, indexAccessMode is mmap"
    fields = outputlog.capture_line(line)
    assert fields
    assert fields['logged_disk_access_mode'] == 'mmap'
    assert fields['logged_index_access_mode'] == 'mmap'
    line = "INFO 11:12:24,303 DatabaseDescriptor.java:326 - DiskAccessMode is standard, indexAccessMode is mmap"
    fields = outputlog.capture_line(line)
    assert fields
    assert fields['logged_disk_access_mode'] == 'standard'
    assert fields['logged_index_access_mode'] == 'mmap'
    line = "INFO 11:13:34,429 DatabaseDescriptor.java:331 - DiskAccessMode is standard, indexAccessMode is standard"
    fields = outputlog.capture_line(line)
    assert fields
    assert fields['logged_disk_access_mode'] == 'standard'
    assert fields['logged_index_access_mode'] == 'standard'
Exemplo n.º 12
0
 def test_parse_disk_access_mode_51(self):
     """validates 5.1 parses correctly"""
     line = (
         "INFO [main] 2018-01-09 12:18:13,157 DatabaseDescriptor.java:374 - "
         + "DiskAccessMode is standard, indexAccessMode is mmap")
     fields = outputlog.capture_line(line)
     self.assertIsNotNone(fields)
     self.assertEqual(fields["logged_disk_access_mode"], "standard")
     self.assertEqual(fields["logged_index_access_mode"], "mmap")
Exemplo n.º 13
0
def test_parse_disk_access_mode_60():
    """validates 6.0 which is a totally new format parses correctly"""
    line = "INFO [main] 2018-01-09 12:32:23,568 DatabaseDescriptor.java:425 - " + \
            "DiskAccessMode is standard, indexAccessMode is standard, commitlogAccessMode is standard"
    fields = outputlog.capture_line(line)
    assert fields
    assert fields['logged_disk_access_mode'] == 'standard'
    assert fields['logged_index_access_mode'] == 'standard'
    assert fields['logged_commit_log_access_mode'] == 'standard'
Exemplo n.º 14
0
 def test_parse_disk_access_mode_60(self):
     """validates 6.0 which is a totally new format parses correctly"""
     line = (
         "INFO [main] 2018-01-09 12:32:23,568 DatabaseDescriptor.java:425 - "
         +
         "DiskAccessMode is standard, indexAccessMode is standard, commitlogAccessMode is standard"
     )
     fields = outputlog.capture_line(line)
     self.assertIsNotNone(fields)
     self.assertEqual(fields["logged_disk_access_mode"], "standard")
     self.assertEqual(fields["logged_index_access_mode"], "standard")
     self.assertEqual(fields["logged_commit_log_access_mode"], "standard")
Exemplo n.º 15
0
 def test_parse_threads_per_core_old_format_with_2_cores(self):
     """pre 5.1 behavior"""
     line = "INFO 10:12:10,382 DseConfig.java:437 - This machine appears to have 2 threads per CPU core."
     fields = outputlog.capture_line(line)
     self.assertIsNotNone(fields)
     self.assertEqual(fields["threads_per_core"], 2)
Exemplo n.º 16
0
def test_parse_threads_per_core_old_format_with_2_cores():
    """pre 5.1 behavior"""
    line = "INFO 10:12:10,382 DseConfig.java:437 - This machine appears to have 2 threads per CPU core."
    fields = outputlog.capture_line(line)
    assert fields
    assert fields['threads_per_core'] == 2