mongodb-d4 icon indicating copy to clipboard operation
mongodb-d4 copied to clipboard

Switch MySQLConverter to use CSV General Log files

Open apavlo opened this issue 13 years ago • 0 comments
trafficstars

Right now the MySQLConverter assumes that the user has loaded in a general log trace into a MySQL database. Instead of accessing the general log table from MySQL, we should switch it to use a CSV file instead:

mysql --database=mysql -B -e "\
  SELECT * INTO OUTFILE 'general_log.csv' \
  FIELDS TERMINATED BY ',' \
  OPTIONALLY ENCLOSED BY '\"' FROM general_log;"

We will need to parse the timestamp field manually in Python, but this is easy. Note that we want to generate the workload trace by writing into the general log table at run time (instead of having mysqld dump it out to a file) since all of our fields will be delimited for us.

apavlo avatar Sep 10 '12 13:09 apavlo