Skip to content

Commit

Permalink
fix: change to nanoseconds
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterZh6 committed Sep 18, 2024
1 parent e52d89c commit a14f111
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,9 @@ public void open() {

@Override
public void deserialize(SourceRecord record, Collector<RowData> out) throws Exception {
long deseializeStartTime = System.currentTimeMillis();
long deserializeStartTime = System.nanoTime();
try {
doDeserialize(record, out, deseializeStartTime);
doDeserialize(record, out, deserializeStartTime);
} catch (Exception e) {
if (sourceExactlyMetric != null) {
sourceExactlyMetric.incNumDeserializeError();
Expand Down Expand Up @@ -186,7 +186,7 @@ private void doDeserialize(SourceRecord record, Collector<RowData> out, long des
}
if (sourceExactlyMetric != null) {
sourceExactlyMetric.incNumDeserializeSuccess();
sourceExactlyMetric.recordDeserializeDelay(System.currentTimeMillis() - deserializeStartTime);
sourceExactlyMetric.recordDeserializeDelay(System.nanoTime() - deserializeStartTime);
}
}

Expand Down

0 comments on commit a14f111

Please sign in to comment.