Performance assessment is provided by an independent program, with command-line input as the only operation method. The official delivery includes only oma.jar. Run the JAR directly; there are no fixed directories such as bin/:
oma.jar # Main program, provides analyze and replay subcommands
Entry and subcommands
Entry |
Procedure |
Feature |
Parameter description |
|---|---|---|---|
java -Xmx2g -jar oma.jar analyze |
Command line | Log parsing and outputting a unified event stream | Log analysis |
java -Xmx2g -jar oma.jar replay |
Command line | Replay Execution and Statistics | Replay Execution |
java -Xmx2g -jar oma.jar replay --report |
Command line | Generate report offline from statistical files | Performance statistics and reports |
java -Xmx2g -jar oma.jar replay --version shows the version. Add --help to each subcommand to view the complete options.
Relationship with compatibility assessment
Performance assessment and compatibility assessment are two independent programs with separate version numbers. They do not share entry points, parameters, configuration files, task libraries, or statistical structures. For information about the entry points and parameter systems of compatibility assessment, see Product form of compatibility assessment. For installation instructions, see Install OMA.
Running examples
Parse Alibaba Cloud RDS audit logs:
java -Xmx2g -jar oma.jar analyze \
-f RDS_SLS -s ./logs/rds-small.csv.gz \
-o ./work/rds-canonical --shards 1 --max-threads 1
Replay (first verify the link using --dry-run):
java -Xmx2g -jar oma.jar replay -c work/dry-run.json --dry-run --output-format json
java -Xmx2g -jar oma.jar replay -c work/replay.json
For the complete procedure by scenario, see Assess the performance difference between Oracle Database and OceanBase Database, Assess the performance difference between MySQL Database and OceanBase Database, and Assess the performance difference between different versions of OceanBase Database.
Configuration file
Log parsing supports command-line parameters, or you can specify a YAML/JSON configuration file using -c. The fields correspond to the command-line options.
Replay behavior is controlled by a JSON configuration file. For the top-level groups and complete structure, see Replay execution:
Group |
Function |
|---|---|
s3 |
Event stream input path and format, supporting local files.file://or object storages3://、oss:// |
database |
Target OceanBase Database Connection Information, Connection Pool, and User Mapping |
replay |
Replay pace, rate limiting, multi-process partitioning, buffering, and session lifecycle |
filters |
SQL type, DDL, transaction, database name, and user filtering |
sqlKeywordFilter |
Filter by SQL keywords |
sqlTransform |
Statement preprocessing (removing hints, splitting batch statements, etc.) |
sqlMapping |
Statement Rewrite Mapping |
checkpoint |
Checkpoint Save Path and Interval |
stats |
Statistics Switch, Output Directory, Data Persistence Interval, and Slow SQL Threshold |
The replay configuration is searched in the following order:
- The path specified by
-c. ./config.jsonin the current directory.~/.oceanbase-replay/config.jsonin the user's home directory.- The built-in
classpath:config.jsonof the program.
Parameter entry for each stage
Phase |
Entry |
Parameter description |
|---|---|---|
| Log Parsing | oma analyze |
Log analysis |
| Replay Execution | oma replay |
Replay Execution |
| Statistics Report | oma replay --report |
Performance statistics and reports |