-
Notifications
You must be signed in to change notification settings - Fork 623
[15721] Peloton Self-Driving Infrastructure #1346
base: master
Are you sure you want to change the base?
Conversation
implement memory metric header 2 memory metric hook up
This reverts commit 754901b.
AbstractMetric just exists for GetInfo()/Reset(). PointMetric is an abstraction for counter-like metrics which get incremented/decremented at a specific point of execution. IntervalMetric is an abstraction for timer-based metrics whose measurements occur over some duration of execution.
AbstractMetric just exists for GetInfo()/Reset(). PointMetric is an abstraction for counter-like metrics which get incremented/decremented at a specific point of execution. IntervalMetric is an abstraction for timer-based metrics whose measurements occur over some duration of execution.
…nto 721-Proj3 Conflicts: src/include/statistics/point_metric.h
This is not going to add much overhead to the engine as the collector would not be blocked. Actually, the blocking thing is the background aggregating thread as it is CAS on the safe_ flag. We would like the test the overhead with some TPCC testbench but it seems that the master branch is running slow. We would definitely run TPCC if we get fast enough later, and we claim it's not going to be hard (just change the stats_mode would switch the collection from on/off). |
Test cases for the framework are added in stats_framework_test.cpp |
…nto 721-Proj3 # Conflicts: # src/catalog/index_metrics_catalog.cpp # src/include/catalog/index_metrics_catalog.h # src/statistics/index_metric.cpp
@@ -33,6 +32,7 @@ | |||
#include "function/timestamp_functions.h" | |||
#include "index/index_factory.h" | |||
#include "settings/settings_manager.h" | |||
#include "storage/database.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In line 198 of this file, the flag should be brain_data_collection. Probably the reason why query_logger_test is failing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change it. Still failing the test. The log is
174: 2018-05-13 10:48:16 [test/sql/testing_sql_util.cpp:60:ExecuteSQLQuery] INFO - Query: SELECT query_string, fingerprint FROM peloton.pg_catalog.pg_query_history;
174: 2018-05-13 10:48:16 [src/codegen/operator/table_scan_translator.cpp:40:TableScanTranslator] DEBUG - Constructing TableScanTranslator ...
174: 2018-05-13 10:48:16 [test/sql/testing_sql_util.cpp:95:ExecuteSQLQuery] INFO - Statement executed. Result: SUCCESS
174: 2018-05-13 10:48:21 [test/sql/testing_sql_util.cpp:60:ExecuteSQLQuery] INFO - Query: SELECT query_string, fingerprint FROM peloton.pg_catalog.pg_query_history;
174: 2018-05-13 10:48:21 [test/sql/testing_sql_util.cpp:95:ExecuteSQLQuery] INFO - Statement executed. Result: SUCCESS
174: 2018-05-13 10:48:26 [test/sql/testing_sql_util.cpp:60:ExecuteSQLQuery] INFO - Query: SELECT query_string, fingerprint FROM peloton.pg_catalog.pg_query_history;
174: 2018-05-13 10:48:26 [test/sql/testing_sql_util.cpp:95:ExecuteSQLQuery] INFO - Statement executed. Result: SUCCESS
174: 2018-05-13 10:48:31 [test/sql/testing_sql_util.cpp:60:ExecuteSQLQuery] INFO - Query: SELECT query_string, fingerprint FROM peloton.pg_catalog.pg_query_history;
174: 2018-05-13 10:48:31 [test/sql/testing_sql_util.cpp:95:ExecuteSQLQuery] INFO - Statement executed. Result: SUCCESS
174: 2018-05-13 10:48:36 [test/sql/testing_sql_util.cpp:60:ExecuteSQLQuery] INFO - Query: SELECT query_string, fingerprint FROM peloton.pg_catalog.pg_query_history;
174: 2018-05-13 10:48:36 [test/sql/testing_sql_util.cpp:95:ExecuteSQLQuery] INFO - Statement executed. Result: SUCCESS
174: 2018-05-13 10:48:41 [test/sql/testing_sql_util.cpp:60:ExecuteSQLQuery] INFO - Query: SELECT query_string, fingerprint FROM peloton.pg_catalog.pg_query_history;
174: 2018-05-13 10:48:41 [test/sql/testing_sql_util.cpp:95:ExecuteSQLQuery] INFO - Statement executed. Result: SUCCESS
174: /home/tianyi/Documents/project/peloton/test/sql/testing_sql_util.cpp:274: Failure
174: Value of: actual_result.size()
174: Actual: 10
174: Expected: ref_result.size()
174: Which is: 11
174: /home/tianyi/Documents/project/peloton/test/sql/testing_sql_util.cpp:282: Failure
174: Value of: actual_result
174: Actual: { "CREATE TABLE test(a INT);|015a5c39f1d456672ab662e8bf9d13598d5d87f697", "SELECT query_string, fingerprint FROM peloton.pg_catalog.pg_query_history;|01851b97a4b7d3bc7fefc53d3b920878c08c4cc914", "INSERT INTO test VALUES (1);|01494aa495a99247b2fe92808c6ae2df065e2ec101", "SELECT query_string, fingerprint FROM peloton.pg_catalog.pg_query_history;|01851b97a4b7d3bc7fefc53d3b920878c08c4cc914", "INSERT INTO test VALUES (2);|01494aa495a99247b2fe92808c6ae2df065e2ec101", "SELECT query_string, fingerprint FROM peloton.pg_catalog.pg_query_history;|01851b97a4b7d3bc7fefc53d3b920878c08c4cc914", "BEGIN;|011e0b3628080f24ada46945aaaa12f4ae69ed0a3b", "SELECT query_string, fingerprint FROM peloton.pg_catalog.pg_query_history;|01851b97a4b7d3bc7fefc53d3b920878c08c4cc914", "INSERT INTO test VALUES (1);|01494aa495a99247b2fe92808c6ae2df065e2ec101", "COMMIT;|01cf0fba0f1cfd731e80292bd9c5e92abbec9056d1" }
174: Expected: ref_result
174: Which is: { "CREATE TABLE test(a INT);|015a5c39f1d456672ab662e8bf9d13598d5d87f697", "SELECT query_string, fingerprint FROM peloton.pg_catalog.pg_query_history;|01851b97a4b7d3bc7fefc53d3b920878c08c4cc914", "INSERT INTO test VALUES (1);|01494aa495a99247b2fe92808c6ae2df065e2ec101", "SELECT query_string, fingerprint FROM peloton.pg_catalog.pg_query_history;|01851b97a4b7d3bc7fefc53d3b920878c08c4cc914", "INSERT INTO test VALUES (2);|01494aa495a99247b2fe92808c6ae2df065e2ec101", "SELECT query_string, fingerprint FROM peloton.pg_catalog.pg_query_history;|01851b97a4b7d3bc7fefc53d3b920878c08c4cc914", "BEGIN;|011e0b3628080f24ada46945aaaa12f4ae69ed0a3b", "SELECT query_string, fingerprint FROM peloton.pg_catalog.pg_query_history;|01851b97a4b7d3bc7fefc53d3b920878c08c4cc914", "INSERT INTO test VALUES (1);|01494aa495a99247b2fe92808c6ae2df065e2ec101", "SELECT query_string, fingerprint FROM peloton.pg_catalog.pg_query_history;|01851b97a4b7d3bc7fefc53d3b920878c08c4cc914", "COMMIT;|01cf0fba0f1cfd731e80292bd9c5e92abbec9056d1" }
174: 2018-05-13 10:48:46 [test/sql/testing_sql_util.cpp:60:ExecuteSQLQuery] INFO - Query: SELECT query_string, fingerprint FROM peloton.pg_catalog.pg_query_history;
174: 2018-05-13 10:48:46 [test/sql/testing_sql_util.cpp:95:ExecuteSQLQuery] INFO - Statement executed. Result: SUCCESS
174: /home/tianyi/Documents/project/peloton/test/sql/testing_sql_util.cpp:274: Failure
174: Value of: actual_result.size()
174: Actual: 12
174: Expected: ref_result.size()
174: Which is: 13
174: /home/tianyi/Documents/project/peloton/test/sql/testing_sql_util.cpp:282: Failure
174: Value of: actual_result
174: Actual: { "CREATE TABLE test(a INT);|015a5c39f1d456672ab662e8bf9d13598d5d87f697", "SELECT query_string, fingerprint FROM peloton.pg_catalog.pg_query_history;|01851b97a4b7d3bc7fefc53d3b920878c08c4cc914", "INSERT INTO test VALUES (1);|01494aa495a99247b2fe92808c6ae2df065e2ec101", "SELECT query_string, fingerprint FROM peloton.pg_catalog.pg_query_history;|01851b97a4b7d3bc7fefc53d3b920878c08c4cc914", "INSERT INTO test VALUES (2);|01494aa495a99247b2fe92808c6ae2df065e2ec101", "SELECT query_string, fingerprint FROM peloton.pg_catalog.pg_query_history;|01851b97a4b7d3bc7fefc53d3b920878c08c4cc914", "BEGIN;|011e0b3628080f24ada46945aaaa12f4ae69ed0a3b", "SELECT query_string, fingerprint FROM peloton.pg_catalog.pg_query_history;|01851b97a4b7d3bc7fefc53d3b920878c08c4cc914", "INSERT INTO test VALUES (1);|01494aa495a99247b2fe92808c6ae2df065e2ec101", "COMMIT;|01cf0fba0f1cfd731e80292bd9c5e92abbec9056d1", "SELECT query_string, fingerprint FROM peloton.pg_catalog.pg_query_history;|01851b97a4b7d3bc7fefc53d3b920878c08c4cc914", "SELECT query_string, fingerprint FROM peloton.pg_catalog.pg_query_history;|01851b97a4b7d3bc7fefc53d3b920878c08c4cc914" }
174: Expected: ref_result
174: Which is: { "CREATE TABLE test(a INT);|015a5c39f1d456672ab662e8bf9d13598d5d87f697", "SELECT query_string, fingerprint FROM peloton.pg_catalog.pg_query_history;|01851b97a4b7d3bc7fefc53d3b920878c08c4cc914", "INSERT INTO test VALUES (1);|01494aa495a99247b2fe92808c6ae2df065e2ec101", "SELECT query_string, fingerprint FROM peloton.pg_catalog.pg_query_history;|01851b97a4b7d3bc7fefc53d3b920878c08c4cc914", "INSERT INTO test VALUES (2);|01494aa495a99247b2fe92808c6ae2df065e2ec101", "SELECT query_string, fingerprint FROM peloton.pg_catalog.pg_query_history;|01851b97a4b7d3bc7fefc53d3b920878c08c4cc914", "BEGIN;|011e0b3628080f24ada46945aaaa12f4ae69ed0a3b", "SELECT query_string, fingerprint FROM peloton.pg_catalog.pg_query_history;|01851b97a4b7d3bc7fefc53d3b920878c08c4cc914", "INSERT INTO test VALUES (1);|01494aa495a99247b2fe92808c6ae2df065e2ec101", "SELECT query_string, fingerprint FROM peloton.pg_catalog.pg_query_history;|01851b97a4b7d3bc7fefc53d3b920878c08c4cc914", "COMMIT;|01cf0fba0f1cfd731e80292bd9c5e92abbec9056d1", "SELECT query_string, fingerprint FROM peloton.pg_catalog.pg_query_history;|01851b97a4b7d3bc7fefc53d3b920878c08c4cc914", "SELECT query_string, fingerprint FROM peloton.pg_catalog.pg_query_history;|01851b97a4b7d3bc7fefc53d3b920878c08c4cc914" }
…Bug in index metric catalog
This PR is working toward an infrastructure for self-driving components on Peloton.
In this checkpoint, we presented:
2, Based on the new framework we collected
To do:
Update metrics on catalog