Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
public
/
sequelize
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
不要怂,就是干,撸起袖子干!
Commit 236b0e76
authored
Oct 24, 2012
by
Mick Hansen
Committed by
Jan Aagaard Meier
Oct 31, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
metrics
1 parent
d238a052
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
lib/dao-factory.js
lib/dialects/mysql/query.js
lib/dao-factory.js
View file @
236b0e7
...
...
@@ -176,7 +176,6 @@ module.exports = (function() {
var
start
=
tk
.
time
();
var
instance
=
new
DAO
(
values
,
Utils
.
_
.
extend
(
this
.
options
,
this
.
attributes
,
{
hasPrimaryKeys
:
this
.
hasPrimaryKeys
}))
,
self
=
this
this
.
daoFactoryManager
.
sequelize
.
_metric
(
'Model.build -> new DAO'
,
tk
.
time
()
-
start
);
options
=
options
||
{}
instance
.
__factory
=
this
...
...
@@ -213,6 +212,7 @@ module.exports = (function() {
instance
.
isNewRecord
=
options
.
hasOwnProperty
(
'isNewRecord'
)
?
options
.
isNewRecord
:
true
instance
.
selectedValues
=
values
this
.
daoFactoryManager
.
sequelize
.
_metric
(
'Model.build'
,
tk
.
time
()
-
start
);
return
instance
}
...
...
lib/dialects/mysql/query.js
View file @
236b0e7
...
...
@@ -16,8 +16,9 @@ module.exports = (function() {
}
Utils
.
inherit
(
Query
,
AbstractQuery
)
var
tk
=
require
(
'timekit'
);
Query
.
prototype
.
run
=
function
(
sql
)
{
var
start
=
tk
.
time
();
this
.
sql
=
sql
if
(
this
.
options
.
logging
!==
false
)
{
...
...
@@ -26,7 +27,7 @@ module.exports = (function() {
this
.
client
.
query
(
this
.
sql
,
function
(
err
,
results
,
fields
)
{
this
.
emit
(
'sql'
,
this
.
sql
)
this
.
sequelize
.
_metric
(
'SQL'
,
tk
.
time
()
-
start
);
if
(
err
)
{
this
.
emit
(
'error'
,
err
,
this
.
callee
)
}
else
{
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment