Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
briar
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository 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
Julian Dehm
briar
Commits
596c1403
Verified
Commit
596c1403
authored
7 years ago
by
akwizgran
Browse files
Options
Downloads
Patches
Plain Diff
Use a single output file for all tests.
parent
302ced14
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bramble-core/src/test/java/org/briarproject/bramble/db/JdbcDatabasePerformanceTest.java
+3
-7
3 additions, 7 deletions
.../briarproject/bramble/db/JdbcDatabasePerformanceTest.java
with
3 additions
and
7 deletions
bramble-core/src/test/java/org/briarproject/bramble/db/JdbcDatabasePerformanceTest.java
+
3
−
7
View file @
596c1403
...
...
@@ -24,6 +24,7 @@ import java.io.FileOutputStream;
import
java.io.PrintWriter
;
import
java.sql.Connection
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -92,7 +93,6 @@ public abstract class JdbcDatabasePerformanceTest extends BrambleTestCase {
private
static
final
int
MEASUREMENT_ITERATIONS
=
100
;
private
final
File
testDir
=
getTestDirectory
();
private
final
File
resultsFile
=
getResultsFile
();
private
final
Random
random
=
new
Random
();
private
List
<
ClientId
>
clientIds
;
...
...
@@ -115,11 +115,6 @@ public abstract class JdbcDatabasePerformanceTest extends BrambleTestCase {
deleteTestDirectory
(
testDir
);
}
private
File
getResultsFile
()
{
long
timestamp
=
System
.
currentTimeMillis
();
return
new
File
(
getTestName
()
+
"-"
+
timestamp
+
".tsv"
);
}
@Test
public
void
testGetContacts
()
throws
Exception
{
String
name
=
"getContacts(T)"
;
...
...
@@ -262,9 +257,10 @@ public abstract class JdbcDatabasePerformanceTest extends BrambleTestCase {
(
long
)
getMedian
(
durations
),
(
long
)
getStandardDeviation
(
durations
));
System
.
out
.
println
(
result
);
File
resultsFile
=
new
File
(
getTestName
()
+
".tsv"
);
PrintWriter
out
=
new
PrintWriter
(
new
FileOutputStream
(
resultsFile
,
true
),
true
);
out
.
println
(
result
);
out
.
println
(
new
Date
()
+
"\t"
+
result
);
out
.
close
();
}
...
...
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