持久层吞吐量优化组件 buffer-slayer

码农软件 · 软件分类 · 程序调试工具 · 2019-11-29 21:43:52

软件介绍

buffer-slayer 是一个把请求在内存中 buffer 并批量发送的工具,适用于批量能显著提升性能的组件(redis-client、jdbc), 支持一对一的回调。

快速启动


  io.bufferslayer
  buffer-spring-jdbc
  1.1.0
ReporterProperties reporterProperties = new ReporterProperties()
        .setBufferedMaxMessages(500)
        .setPendingMaxMessages(10000)
        .setMetrics("inmemory")
        .setMetricsExporter("http")
        .setParallelismPerBatch(5)
        .setSenderExecutor(new ThreadPoolExecutor(200,
            200, 0, TimeUnit.MILLISECONDS, new SynchronousQueue<>()));

BatchedJdbcTemplate template = new BatchedJdbcTemplate(reporterProperties);
template.setDataSource(dataSource);

Promise promise = template.update(...);
promise.done(success -> ...)
       .fail(reject -> ...);

吞吐量对比

Benchmark                                                      Mode  Cnt       Score  Units
BatchedJdbcTemplateBenchmark.high_contention_batched          thrpt   15    8709.042  ops/s
BatchedJdbcTemplateBenchmark.high_contention_unbatched        thrpt   15     271.529  ops/s
BatchedJdbcTemplateBenchmark.mild_contention_batched          thrpt   15    2146.595  ops/s
BatchedJdbcTemplateBenchmark.mild_contention_unbatched        thrpt   15     262.621  ops/s
BatchedJdbcTemplateBenchmark.no_contention_batched            thrpt   15    1194.852  ops/s
BatchedJdbcTemplateBenchmark.no_contention_unbatched          thrpt   15     201.806  ops/s

 

本文地址:https://www.codercto.com/soft/d/20083.html

ASP.NET网页制作教程

ASP.NET网页制作教程

王国荣 / 华中科技 / 2002-1 / 78.00元

《ASP.NET网页制作教程:从基本语法学起(附光盘)》分为:基础篇、对象应用篇、案例研究篇。奠定ASP网页制作的基础,使用Server控件制作互动网页,使用ADO.NET访问数据库;计费网费、会员管理、访客计数器Server版、访客留言板、新闻讨论群组、电子贺卡、E-mail自动传送、FIP文件上传、在线投票、在线问卷调查、在线购物、在线考试、广告回旋板、聊天室。一起来看看 《ASP.NET网页制作教程》 这本书的介绍吧!

JS 压缩/解压工具
JS 压缩/解压工具

在线压缩/解压 JS 代码

图片转BASE64编码
图片转BASE64编码

在线图片转Base64编码工具

Base64 编码/解码
Base64 编码/解码

Base64 编码/解码