opensource4you / astraea

釋放kafka的無限潛能
Apache License 2.0
129 stars 46 forks source link

[COMMON] Remove open csv #1807

Closed brandboat closed 1 year ago

brandboat commented 1 year ago

fixes https://github.com/skiptests/astraea/issues/1239

不過尷尬的是我們在 org.astraea.common.json.TypeRef 中有使用到 commons-lang3,這隻 pr 還是把 commons-lang3 給加回來,如果有需要再把 commons-lang3 移除,需要再開張 pr 來解決這件事

brandboat commented 1 year ago

可否做個小實驗看看兩個版本之間的效率是否有明顯差異

單位是每秒的執行次數,數值愈高愈好,看起來自行撰寫的版本在寫入上面快了一倍多

opencsv 
---
Benchmark            Mode  Cnt        Score       Error  Units
CsvBenchmark.read   thrpt   10  1106793.226 ± 28649.625  ops/s
CsvBenchmark.write  thrpt   10      330.619 ±    19.448  ops/s

customized
---
Benchmark            Mode  Cnt        Score       Error  Units
CsvBenchmark.read   thrpt   10  1161458.738 ± 72437.734  ops/s
CsvBenchmark.write  thrpt   10      748.825 ±    12.976  ops/s
brandboat commented 1 year ago

@chia7712 效能驗證的程式碼放在 Add CsvBenchmark,感謝

chia7712 commented 1 year ago

@brandboat 感謝,效能看起來差異不大,這樣做的很好