Package io.debezium.performance.engine
Class PostgresEndToEndPerf
java.lang.Object
io.debezium.performance.engine.PostgresEndToEndPerf
- Direct Known Subclasses:
PostgresEndToEndPerf_jmhType_B1
Basic end-to-end comparison between
EmbeddedEngine and AsyncEmbeddedEngine.
Heavily inspired by JMH benchmark EndToEndPerf for Oracle connector and reusing parts of its code,
this test pre-creates specified number of records in the Postgres database and measure how long it takes
to the engine to process them and store in an in-memory queue.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Stringprivate static final Stringprivate static final Stringprivate static final io.debezium.engine.format.KeyValueChangeEventFormatprivate static final Stringprivate static final intprivate static final Stringprivate static final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static PropertiesaddSmtConfig(io.debezium.config.Configuration config) private static voidcreateDmlEvents(String tableName, int eventCount) private static io.debezium.config.Configuration.Builderprivate static io.debezium.jdbc.JdbcConfigurationprivate static voidprivate static ObjectNameprivate static PathgetRecordConsumer(BlockingQueue<EmbeddedEngineChangeEvent> consumedLines) private static PostgresConnectionprivate static booleaninTestDataDir(Path path) voidvoidprivate static voidrecreateTable(String tableName) private static Stringprivate static void
-
Field Details
-
HOST
- See Also:
-
PORT
private static final int PORT- See Also:
-
USER
- See Also:
-
PASSWORD
- See Also:
-
DATABASE
- See Also:
-
SERVER_NAME
- See Also:
-
BASE_TABLE_NAME
- See Also:
-
KV_EVENT_FORMAT
private static final io.debezium.engine.format.KeyValueChangeEventFormat KV_EVENT_FORMAT
-
-
Constructor Details
-
PostgresEndToEndPerf
public PostgresEndToEndPerf()
-
-
Method Details
-
defaultJdbcConfig
private static io.debezium.jdbc.JdbcConfiguration defaultJdbcConfig() -
defaultConnectorConfig
private static io.debezium.config.Configuration.Builder defaultConnectorConfig() -
addSmtConfig
-
getRecordConsumer
private static Consumer<io.debezium.engine.ChangeEvent<String,String>> getRecordConsumer(BlockingQueue<EmbeddedEngineChangeEvent> consumedLines) -
recreateTable
-
createDmlEvents
-
getTestConnection
-
waitForStreamingToStart
private static void waitForStreamingToStart() -
getMbeanName
- Throws:
MalformedObjectNameException
-
getPath
-
delete
-
inTestDataDir
-
resolveDataDir
-
processRecordsEmbeddedEngine
-
processRecordsAsyncEngine
-