@@ -7,7 +7,7 @@ const sequelize = new Sequelize('hello_world', 'benchmarkdbuser', 'benchmarkdbpa
7
7
logging : false
8
8
} ) ;
9
9
10
- const Worlds = sequelize . define ( 'World ' , {
10
+ const Worlds = sequelize . define ( 'world ' , {
11
11
id : {
12
12
type : 'Sequelize.INTEGER' ,
13
13
primaryKey : true
@@ -51,7 +51,7 @@ module.exports = {
51
51
52
52
for ( let i = 0 ; i < queries ; i ++ ) {
53
53
worldPromises . push ( randomWorldPromise ( ) ) ;
54
- }
54
+ }
55
55
56
56
Promise . all ( worldPromises ) . then ( ( worlds ) => {
57
57
h . addTfbHeaders ( res , 'json' ) ;
@@ -74,19 +74,22 @@ module.exports = {
74
74
Updates : ( queries , req , res ) => {
75
75
const worldPromises = [ ] ;
76
76
77
+ console . log ( 'queries: ' , queries ) ;
77
78
for ( let i = 0 ; i < queries ; i ++ ) {
78
79
worldPromises . push ( randomWorldPromise ( ) ) ;
79
80
}
80
81
81
82
const worldUpdate = ( world ) => {
82
- world . randomNumber = h . randomTfbNumber ( ) ;
83
+ world . randomnumber = h . randomTfbNumber ( ) ;
84
+
85
+ console . log ( 'RANDOM NUMBER: ' , world . randomnumber ) ;
83
86
84
87
return Worlds . update ( {
85
- randomNumber : world . randomNumber
86
- } ,
87
- {
88
- where : { id : world . id }
89
- } ) . then ( ( results ) => {
88
+ randomnumber : world . randomnumber
89
+ } ,
90
+ {
91
+ where : { id : world . id }
92
+ } ) . then ( ( results ) => {
90
93
return world ;
91
94
} ) . catch ( ( err ) => process . exit ( 1 ) ) ;
92
95
} ;
0 commit comments