Coder Social home page Coder Social logo

beeop's People

Contributors

chris2018998 avatar

Watchers

 avatar  avatar

beeop's Issues

有无相关的技术文档呢?

有无一些关于对象池设计的讲解,比如为什么该对象池会这么快?
网上并没有找到非常有营养的相关文章

做了一个jmh测试,测试结果相当不错

如题,做了一个 BeeOPcommons-pool2 对比测试,结果表明,特定场景下,效果非常好。

Benchmark                                    Mode  Cnt          Score         Error  Units
ObjectPoolBenchmark.testBeeOP               thrpt   30   43178816.940 ± 4428429.024  ops/s
ObjectPoolBenchmark.testBeeOPAsArray        thrpt   30      43057.135 ±     423.165  ops/s
ObjectPoolBenchmark.testCommonsPool         thrpt   30    2280809.683 ±   39073.261  ops/s
ObjectPoolBenchmark.testCommonsPoolAsArray  thrpt   30      20907.926 ±     128.897  ops/s
ObjectPoolBenchmark.testNew                 thrpt   30  202345460.573 ± 2032248.689  ops/s
ObjectPoolBenchmark.testNewAsArray          thrpt   30    1832622.826 ±   12826.881  ops/s

分两个场景测试:

  1. 多线程情况下,一线程一对象模式,模拟 http 请求方式
  2. 多线程情况下,一线程多对象模式,模拟生产者消费者方式

从测试结果看,BeeOP 对场景1进行了特殊处理:通过 ThreadLocal 极大加速了这类场景的使用效能。但是,对于场景二,受限于结构,就不这么突出了,但是仍然比 commons-pool2 高1倍。

代码如下/code as blow :
jmh.benchmark.tar.gz

Database can not be null

因为业务需要,会基于参数变更connection的catalog。
默认不设置catalog,连接如下:
127.0.0.1:3306/?useUnicode=true&useSSL=false
在设置catalog后,beecp执行完SQL,关闭connection时,通过recycleSelf调用resetRawConn按照defCatalog进行复位
产生如下问题:
1、出于什么考虑,再会connection关闭后进行复位?
2、是否可以关闭该复位?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.