Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
VideoLAN
medialibrary
Commits
06a463ea
Commit
06a463ea
authored
Jul 23, 2018
by
Hugo Beauzée-Luyssen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SqliteQuery: Log COUNT request & request duration
parent
c7b32d94
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
src/database/SqliteQuery.h
src/database/SqliteQuery.h
+4
-0
No files found.
src/database/SqliteQuery.h
View file @
06a463ea
...
...
@@ -59,8 +59,12 @@ public:
std
::
string
req
=
"SELECT COUNT() "
+
m_base
;
auto
dbConn
=
m_ml
->
getConn
();
auto
ctx
=
dbConn
->
acquireReadContext
();
auto
chrono
=
std
::
chrono
::
steady_clock
::
now
();
sqlite
::
Statement
stmt
(
dbConn
->
handle
(),
req
);
stmt
.
execute
(
m_params
);
auto
duration
=
std
::
chrono
::
steady_clock
::
now
()
-
chrono
;
LOG_DEBUG
(
"Executed "
,
req
,
" in "
,
std
::
chrono
::
duration_cast
<
std
::
chrono
::
microseconds
>
(
duration
).
count
(),
"µs"
);
auto
row
=
stmt
.
row
();
row
>>
m_count
;
assert
(
stmt
.
row
()
==
nullptr
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
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 comment