Commit f6c1b145 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

software/erp5: record mariadb data and binlog size after benchmark test.

parent 894d5cf3
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
import contextlib import contextlib
import datetime import datetime
import json import json
import os
import pathlib import pathlib
import socket import socket
import struct import struct
...@@ -289,9 +290,21 @@ class TestOrderBuildPackingListSimulation( ...@@ -289,9 +290,21 @@ class TestOrderBuildPackingListSimulation(
mariadb_slowquery_log = pathlib.Path( mariadb_slowquery_log = pathlib.Path(
self.getComputerPartitionPath( self.getComputerPartitionPath(
'mariadb')) / 'var' / 'log' / 'mariadb_slowquery.log' 'mariadb')) / 'var' / 'log' / 'mariadb_slowquery.log'
mariadb_data = pathlib.Path(
self.getComputerPartitionPath(
'mariadb')) / 'srv' / 'mariadb'
mariadb_data_size = sum(sum(os.path.getsize(os.path.join(root, f)) for f in files) \
for root, dirs, files in os.walk(mariadb_data))
mariadb_binlog_data = pathlib.Path(
self.getComputerPartitionPath(
'mariadb')) / 'srv' / 'backup' / 'mariadb-incremental'
mariadb_binlog_data_size = sum(sum(os.path.getsize(os.path.join(root, f)) for f in files) \
for root, dirs, files in os.walk(mariadb_binlog_data))
self.write_measurement( self.write_measurement(
{ {
'pt-query-digest': 'pt-query-digest':
subprocess.check_output( subprocess.check_output(
(pt_query_digest, mariadb_slowquery_log), text=True) (pt_query_digest, mariadb_slowquery_log), text=True),
'data-size': mariadb_data_size,
'binlog-data-size': mariadb_binlog_data_size,
}) })
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment