DocumentationDataMigrate ProOperation

DataMigrate ProOperation

DataMigrate Pro Benchmark Feature Guide

The benchmark for putdata and putalldata writes cumulative phase timings to a JSON file. This guide explains how to enable it and read the metrics.

Date: 2026-03-31

1. Purpose

This guide explains the benchmark feature for putdata and putalldata:

  1. How to enable it.
  2. Where the output is written.
  3. How the JSON output is structured.
  4. How to interpret the metrics correctly.

The benchmark is designed to provide cumulative, phase-based timings across all chunks and all processed tables.

2. Enable Benchmark

Benchmarking is disabled by default and is only active when a benchmark switch is passed.

Supported switches:

  1. --benchmark
  2. -benchmark
  3. --bm
  4. -bm
  5. --benchmarkjson (also enables run recording)

Accepted truthy values for explicit switch values:

  1. 1
  2. true
  3. on
  4. yes

Examples:

CMD
DataMigratePro.exe -t putalldata --benchmark
CMD
DataMigratePro.exe -t putalldata --bm true --changesonly 1
CMD
DataMigratePro.exe -t putdata -s 36 -i "SELECT * FROM [CRONUS$Sales Header]" --benchmark

Optional mode hint:

CMD
DataMigratePro.exe -t putalldata --benchmark --benchmarkmode azuresql

Notes:

  1. --benchmarkmode sets the mode field in output (for example api or azuresql).
  2. Benchmark does not change business logic; it only records timings and counters.

3. Output Location

Each benchmark run writes one JSON file:

  1. Directory: logs/perf
  2. File name: <runId>.json

Example path:

Text
logs/perf/6e5b2ef3fef0455d9f0bf0d4d5d7f79f.json

A compact console summary is also logged at the end of the run.

4. JSON Output Shape

Top-level output structure:

JSON
{
  "schemaVersion": "1",
  "runId": "6e5b2ef3fef0455d9f0bf0d4d5d7f79f",
  "mode": "api",
  "startedAtUtc": "2026-03-31T09:02:11.186Z",
  "finishedAtUtc": "2026-03-31T09:12:03.529Z",
  "totalDurationMs": 592343,
  "totalRecordsSent": 1250045,
  "totalPayloadBytes": 913442119,
  "totalChunks": 318,
  "totalRetries": 12,
  "totalErrors": 0,
  "avgRecordBytes": 730,
  "throughputRecordsPerSec": 2110.2,
  "throughputMBps": 1.47,
  "phases": [
    {
      "phase": "SendToBC",
      "cumulativeDurationMs": 269000,
      "pctOfTotal": 45.41,
      "callCount": 318,
      "recordsProcessed": 1250045,
      "fieldsTotal": 0,
      "payloadBytes": 913442119,
      "avgRecordBytes": 730,
      "throughputRecordsPerSec": 4647.0,
      "throughputMBps": 3.24,
      "p50DurationMs": 710,
      "p95DurationMs": 1620
    }
  ],
  "tables": [
    {
      "tableNo": 36,
      "tableName": "Sales Header",
      "plannedRecords": 350000,
      "fieldCount": 0,
      "phaseMs": {
        "QueryBuild": 1850,
        "QueryExecute": 12000,
        "Transform": 15900,
        "SendToBC": 74200,
        "TransferLogWrite": 120
      }
    }
  ]
}

5. Phase Catalog

Current phase names in benchmark output:

  1. SchemaRead
  2. RecordCountRead
  3. MappingBuild
  4. QueryBuild
  5. QueryExecute
  6. Transform
  7. ChannelSetup
  8. SendToBC
  9. AzureSqlUpload
  10. TransferLogWrite
  11. BCFinalizeWait

Interpretation hints:

  1. Not every run contains every phase.
  2. API-heavy runs typically show SendToBC and BCFinalizeWait.
  3. Azure SQL staging runs typically show AzureSqlUpload and often BCFinalizeWait around codeunit-triggered finalization.

6. How to Interpret Measures

6.1 First pass: where is time spent?

Sort by pctOfTotal in phases.

  1. Biggest pctOfTotal = primary bottleneck.
  2. Second biggest = secondary optimization target.

6.2 Throughput and volume

Use these top-level values together:

  1. totalRecordsSent
  2. totalDurationMs
  3. throughputRecordsPerSec
  4. throughputMBps
  5. avgRecordBytes

If records/s is low while MB/s is high, records are likely large and payload-heavy. If records/s and MB/s are both low, the bottleneck is usually CPU transformation, waiting, retries, or endpoint latency.

6.3 Phase latency distribution

Use p50DurationMs and p95DurationMs:

  1. p50 = typical chunk latency.
  2. p95 = tail latency (slow chunks).

If p95 is much larger than p50, chunk performance is unstable. Common causes:

  1. Intermittent network latency.
  2. Server-side lock/contention.
  3. Retries under load.

6.4 Retry signal

totalRetries > 0 indicates transport instability or transient endpoint pressure.

Practical rule:

  1. Stable runs should keep retries near zero.
  2. Rising retries usually inflate BCFinalizeWait and/or SendToBC time.

6.5 Table-level hotspot analysis

Use tables[].phaseMs to find problematic tables.

  1. High QueryExecute per table: source SQL bottleneck.
  2. High Transform: mapping/transformation cost.
  3. High SendToBC or AzureSqlUpload: transport bottleneck.

7. Practical Comparison: API vs Azure SQL

For fair comparison, keep these constants the same:

  1. Same data snapshot.
  2. Same table set.
  3. Same chunk strategy and runtime options.
  4. Same environment and network path as far as possible.

Compare at least:

  1. totalDurationMs
  2. throughputRecordsPerSec
  3. throughputMBps
  4. totalRetries
  5. Dominant phase (pctOfTotal leader)

Decision pattern:

  1. If API runs are dominated by SendToBC with high retries/tail latency, Azure SQL staging may help.
  2. If both modes are dominated by Transform or QueryExecute, transport change alone will not solve the bottleneck.

8. Common Misinterpretations

  1. High callCount is not automatically bad.
  2. Low totalDurationMs with low totalRecordsSent is not a performance win.
  3. Comparing runs with different data sizes without normalization is misleading.

Always normalize by records and bytes.

9. Fast Analysis Checklist

After each run:

  1. Confirm benchmark file exists under logs/perf.
  2. Check totalRecordsSent against expected volume.
  3. Identify top phase by pctOfTotal.
  4. Inspect p50/p95 gap for instability.
  5. Check totalRetries and totalErrors.
  6. Inspect top 3 tables in tables[].phaseMs for hotspot concentration.
  1. docs/Performance-Analysis-Guide.md
  2. docs/Performance-Logging-Guide.md
  3. docs/Performance-Optimizations-Summary.md
  4. docs/AzureSql-EndUser-Guide.md