File tree Expand file tree Collapse file tree 1 file changed +9
-10
lines changed Expand file tree Collapse file tree 1 file changed +9
-10
lines changed Original file line number Diff line number Diff line change 1
1
// Last v8 profile when running this test for 500k rows:
2
2
// https://gist.github.com/f85c38010c038e5efe2e
3
- require ( '../../test/common' ) ;
4
- var Client = require ( 'mysql /client' ) ,
5
- client = Client ( TEST_CONFIG ) ,
3
+ var common = require ( '../../test/common' ) ;
4
+ var Client = require ( '../../lib /client' ) ,
5
+ client = common . createClient ( ) ,
6
6
rows = 0 ;
7
7
8
8
client . typeCast = false ;
9
9
10
- client . connect ( ) ;
11
- client . query ( 'CREATE DATABASE ' + TEST_DB , function ( err ) {
12
- if ( err && err . number != Client . ERROR_DB_CREATE_EXISTS ) {
13
- throw err ;
14
- }
10
+ client . query ( 'CREATE DATABASE ' + common . TEST_DB , function ( err ) {
11
+ //if (err && err.number != Client.ERROR_DB_CREATE_EXISTS) {
12
+ //throw err;
13
+ //}
15
14
} ) ;
16
15
17
- client . query ( 'USE ' + TEST_DB ) ;
16
+ client . query ( 'USE ' + common . TEST_DB ) ;
18
17
var selectStart = + new Date ;
19
18
20
19
function query ( ) {
21
20
client
22
- . query ( 'SELECT * FROM ' + TEST_TABLE )
21
+ . query ( 'SELECT * FROM ' + common . TEST_TABLE )
23
22
. on ( 'row' , function ( row ) {
24
23
rows ++ ;
25
24
} )
You can’t perform that action at this time.
0 commit comments