Application PT
5条数据的id,跑1000次
基本上 parallelStream的时间和select-in打成平手)
而db整体耗时是redis的3倍
--------------------------------------------- ns % Task name --------------------------------------------- 29926734948 038% db loop get 29964725520 038% db muti get 9562347590 012% redis loop get 9686850298 012% redis muti get
当数据条数增加到10条,跑1000次
muti-get的优势就出来了
--------------------------------------------- ns % Task name --------------------------------------------- 42894849436 041% db loop get 21117233856 020% db muti get 32507733913 031% redis loop get 7028126914 007% redis muti get
parallelStream