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
3fdcbf9c
Commit
3fdcbf9c
authored
5 years ago
by
Daniel
Browse files
Options
Downloads
Patches
Plain Diff
DOC: Benchmarking
parent
57d3b5dd
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
doc/devel/Benchmarking.md
+35
-6
35 additions, 6 deletions
doc/devel/Benchmarking.md
with
35 additions
and
6 deletions
doc/devel/Benchmarking.md
+
35
−
6
View file @
3fdcbf9c
# Manual Java-
S
ide
B
enchmarking #
# Manual Java-
s
ide
b
enchmarking #
Benchmarking can be done using the
`TransactionBenchmark`
class (in package
`caosdb.server.database.misc`
).
...
...
@@ -12,14 +12,14 @@ Benchmarking can be done using the `TransactionBenchmark` class (in package
-
`Container.getTransactionBenchmark().addBenchmark()`
-
`Query.addBenchmark()`
# Miscellaneous
N
otes #
# Miscellaneous
n
otes #
Notes to self, details, etc.
## On method calling order and benchmarked events ##
-
`Transaction.execute()`
:: Logs benchmarks for events like:
-
`INIT`
-
`INIT`
:: The transaction's
`init()`
method.
-
`PRE_CHECK`
-
`CHECK`
-
`POST_CHECK`
...
...
@@ -29,13 +29,42 @@ Notes to self, details, etc.
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
-
`backend.transaction.[...].execute(transaction)`
:: This method is benchmarked
again (via parent class
`BackendTransaction`
), this is probably the deepest
level of benchmarking currently (Benchmark is logged as
e.g.
`<RetrieveFullEntity>...</>`
). It finally calls
`[MySQLTransaction].execute()`
.
-
`[MySQLTransaction].execute()`
:: This is the de
p
pest backend implementation
-
`[MySQLTransaction].execute()`
:: This is the de
e
pest 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
## Server settings ##
-
To enable the SQL general logs, log into the SQL server and do:
```
sql
SET
GLOBAL
log_output
=
'TABLE'
;
SET
GLOBAL
general_log
=
'ON'
;
```
-
To enable transaction benchmarks and disable caching in the server, set these
server settings:
```
conf
TRANSACTION_BENCHMARK_ENABLED
=
true
CACHE_DISABLE
=
true
```
-
Additionally, the server should be started via
`make run-debug`
(instead of
`make run-single`
), otherwise the benchmarking will not be active.
## Notable benchmarks and where to find them ##
| Name | Where measured | What measured |
|--------------------------------------|----------------------------------------------|-------------------------------|
|
`Retrieve.init`
| transaction/Transaction.java#135 | transaction/Retrieve.java#48 |
|
`Retrieve.transaction`
| transaction/Transaction.java#174 | transaction/Retrieve.java#133 |
|
`Retrieve.post_transaction`
| transaction/Transaction.java#182 | transaction/Retrieve.java#77 |
|
`EntityResource.httpGetInChildClass`
| resource/transaction/EntityResource.java#118 | all except XML generation |
|
`ExecuteQuery`
| ? | ? |
| | | |
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