Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
caosdb-server
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
caosdb
Software
caosdb-server
Commits
d3a20a4b
Commit
d3a20a4b
authored
5 years ago
by
Daniel
Browse files
Options
Downloads
Patches
Plain Diff
DOC MAINT: Notes on benchmarking, renaming variable.
parent
394cad63
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
doc/devel/Benchmarking.md
+28
-0
28 additions, 0 deletions
doc/devel/Benchmarking.md
src/main/java/caosdb/server/database/backend/implementation/MySQL/MySQLRetrieveSparseEntity.java
+3
-3
3 additions, 3 deletions
...ckend/implementation/MySQL/MySQLRetrieveSparseEntity.java
with
31 additions
and
3 deletions
doc/devel/Benchmarking.md
+
28
−
0
View file @
d3a20a4b
...
...
@@ -11,3 +11,31 @@ Benchmarking can be done using the `TransactionBenchmark` class (in package
-
To work with the benchmarks of often used objects, use these methods:
-
`Container.getTransactionBenchmark().addBenchmark()`
-
`Query.addBenchmark()`
# Miscellaneous Notes #
Notes to self, details, etc.
## On method calling order and benchmarked events ##
-
`Transaction.execute()`
:: Logs benchmarks for events like:
-
`INIT`
-
`PRE_CHECK`
-
`CHECK`
-
`POST_CHECK`
-
`PRE_TRANSACTION`
-
`TRANSACTION`
-> typically calls
`database.backend.transaction.[BackendTransaction].execute()`
, which in turn
calls, some levels deeper,
`backend.transaction.....execute(<k extends
BackendTransaction> t)`
-> see next point
-
...
-
`backend.transaction.....execute(transaction)`
:: This method is benchmarked
again, this is probably the deepest level of benchmarking. It finally calls
`[MySQLTransaction].execute()`
.
-
`[MySQLTransaction].execute()`
:: This is the deppest backend implementation
part, it typically creates a prepared statement and executes it.
-
Currently not benchmarked separately:
-
Getting the actual implementation (probably fast?)
-
Preparing the SQL statement
-
Executing the SQL statement
-
Java-side caching
This diff is collapsed.
Click to expand it.
src/main/java/caosdb/server/database/backend/implementation/MySQL/MySQLRetrieveSparseEntity.java
+
3
−
3
View file @
d3a20a4b
...
...
@@ -43,10 +43,10 @@ public class MySQLRetrieveSparseEntity extends MySQLTransaction
@Override
public
SparseEntity
execute
(
final
int
id
)
throws
TransactionException
{
try
{
final
PreparedStatement
prepareStatement
=
prepareStatement
(
stmtStr
);
final
PreparedStatement
prepare
d
Statement
=
prepareStatement
(
stmtStr
);
prepareStatement
.
setInt
(
1
,
id
);
final
ResultSet
rs
=
prepareStatement
.
executeQuery
();
prepare
d
Statement
.
setInt
(
1
,
id
);
final
ResultSet
rs
=
prepare
d
Statement
.
executeQuery
();
try
{
return
DatabaseUtils
.
parseEntityResultSet
(
rs
);
}
finally
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment