tpcc业务流程
2020-04-15 17:11:59 0 举报
tpcc业务逻辑
作者其他创作
大纲/内容
在jtpccterminal中run方法先判断是按照分钟执行事务还是按照每个终端总事务执行数,是否改变终端的仓库id(1,warehouse)(0-100)选择对应的业务逻辑,非自动提交
事时打印的值为每分钟预估值trans中包含new_order数time=current_time-startsessiontpm=(trans_cnt/time)*60000mstpmc=(new_order/time)*60000mscurent的tpm值(trans-order)*12mem:获取虚拟机内存Runtime.getRuntime().freeMemoryRuntime.getRuntime().totalMemorytransactionCount:(5种事务)数总和fastNewOrderCounter:新订单数signalTerminalEnded\tdouble tpmC = (6000000*fastNewOrderCounter/(currTimeMillis - sessionStartTimestamp))/100.0;\tdouble tpmTotal = (6000000*transactionCount/(currTimeMillis - sessionStartTimestamp))/100.0;TC=transactionCount-1
transPerTerminal通过i++
通过for产生jtpccterminal线程数组(warehouse)(随机生成warehouse与仓库id)与start执行
0 条评论
下一页
为你推荐
查看更多