Skip to content

Commit

Permalink
Added tests for MySQL with and without compression.
Browse files Browse the repository at this point in the history
  • Loading branch information
yashwantsahu20 committed Dec 19, 2024
1 parent 292eddc commit bab1dbc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/tap/tests/mysql-protocol_compression_level-t.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ int main(int argc, char** argv) {
if(cl.getEnv())
return exit_status();

plan(7);
plan(8);

// ProxySQL connection without compression
proxysql = initilize_mysql_connection(cl.host, cl.username, cl.password, cl.port, false);
Expand Down Expand Up @@ -158,10 +158,10 @@ int main(int argc, char** argv) {
goto cleanup;
}

diff = time_mysql_without_compressed - time_mysql_compressed;
diff = abs(time_mysql_without_compressed - time_mysql_compressed);
performance_diff = (diff * 100) / time_mysql_without_compressed;

diag("Time difference for mysql, compression and without compression is: %d", performance_diff);
ok((performance_diff < 10), "MySQL with compression performed well compared to without compression. Performance difference: %d percentage", performance_diff);

ret = get_variable_value(proxysql_admin, "mysql-protocol_compression_level", compression_level, true);
if (ret == EXIT_SUCCESS) {
Expand Down

0 comments on commit bab1dbc

Please sign in to comment.