Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BeeCP's Persformance score too high #1513

Open
Chris2018998 opened this issue Dec 13, 2019 · 2 comments
Open

BeeCP's Persformance score too high #1513

Chris2018998 opened this issue Dec 13, 2019 · 2 comments

Comments

@Chris2018998
Copy link

Chris2018998 commented Dec 13, 2019

Dear All,

I am a Java new, I made a simple JDBC Pool(BeeCP:http://www.github.com/Chris2018998/BeeCP),

and tested its performance with HikariCP‘ benchmark,but its score is higher than 'HikariCP'.

please help me to find out the cause. Appreciate for help from anyone.

It is not a AD, thanks!

@billoneil
Copy link

Have you read through the various Wiki's especially this one https://github.com/brettwooldridge/HikariCP/wiki/%22My-benchmark-doesn't-show-a-difference.%22?

@Chris2018998
Copy link
Author

Chris2018998 commented Dec 14, 2019

Hi Bill,

Thank you very much. I have read it and add some connection reset code to my pool, then retested it, but the performance score still be high(the score has reduced, which is right direction), my test code

 private void setupBeeCPWithCompete(){
	BeeDataSourceConfig config = new BeeDataSourceConfig();
	config.setDriverClassName(jdbcDriver);
	config.setJdbcUrl(jdbcUrl);
	config.setUsername(jdbcUsername);
	config.setPassword(jdbcPassword);
	config.setMaxActive(maxPoolSize);
	config.setInitialSize(MIN_POOL_SIZE);
	config.setMaxWait(8000);
	config.setPreparedStatementCacheSize(10);
	config.setConnectionTestSQL("select 1 from dual");
	config.setClearSQLWarnings(true);
	config.setTestOnBorrow(true);
	config.setDefaultAutoCommit(false); //<----- maybe here(new code added )
	DS = new BeeDataSource(config);
 }

I added a real db table to the benchmark source to test 'roll back on return'

    @Setup(Level.Trial)
    public void setup(BenchmarkParams params)
    {
	//...........
        switch (pool)
        {
        case "hikari":
	    stmSQL="INSERT INTO test(ds_name)VALUES ('hikari')";
            setupHikari();
            break;
     case "tomcat":
	    stmSQL="INSERT INTO test(ds_name)VALUES ('tomcat')";
            setupTomcat();
            break;
        case "beeCP-compete":
	    stmSQL="INSERT INTO test(ds_name)VALUES ('beeCP-compete')";
            setupBeeCPWithCompete();
	    break;
        //...........
      }
}

1 retested result with stubDriver( PC: I3-7100, 8G )
SubDriver

2 retested with Mysql5.6.4-64 ( PC: I3-7100, 8G )
Mysql

Mysql_tableQry

I have uploaded the test package to my project, download url is:
https://github.com/Chris2018998/BeeCP/blob/master/doc/performance/HikariCP-benchmark_BeeCP.zip

@Chris2018998 Chris2018998 changed the title Please help me to find out the JDBC Pool bugs,thanks BeeCP's Persformance Score too high Dec 23, 2019
@Chris2018998 Chris2018998 changed the title BeeCP's Persformance Score too high BeeCP's Persformance score too high Dec 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants