Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
7c03c648
Commit
7c03c648
authored
Jul 22, 2014
by
John Esmet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
FT-304 Add stress test coverage for db->get_fragmentation(db)
parent
54f98281
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
4 deletions
+16
-4
src/tests/test_stress7.cc
src/tests/test_stress7.cc
+6
-4
src/tests/threaded_stress_test_helpers.h
src/tests/threaded_stress_test_helpers.h
+10
-0
No files found.
src/tests/test_stress7.cc
View file @
7c03c648
...
...
@@ -108,7 +108,7 @@ stress_table(DB_ENV *env, DB **dbp, struct cli_args *cli_args) {
//
if
(
verbose
)
printf
(
"starting creation of pthreads
\n
"
);
const
int
num_threads
=
4
+
cli_args
->
num_update_threads
+
cli_args
->
num_ptquery_threads
;
const
int
num_threads
=
5
+
cli_args
->
num_update_threads
+
cli_args
->
num_ptquery_threads
;
struct
arg
myargs
[
num_threads
];
for
(
int
i
=
0
;
i
<
num_threads
;
i
++
)
{
arg_init
(
&
myargs
[
i
],
dbp
,
env
,
cli_args
);
...
...
@@ -129,19 +129,21 @@ stress_table(DB_ENV *env, DB **dbp, struct cli_args *cli_args) {
myargs
[
1
].
operation_extra
=
&
soe
[
1
];
myargs
[
1
].
operation
=
scan_op
;
// make the guy
that runs HOT
in the background
// make the guy
s that run hot optimize, keyrange, and frag stats
in the background
myargs
[
2
].
operation
=
hot_op
;
myargs
[
3
].
operation
=
keyrange_op
;
myargs
[
4
].
operation
=
frag_op
;
myargs
[
4
].
sleep_ms
=
100
;
struct
update_op_args
uoe
=
get_update_op_args
(
cli_args
,
NULL
);
// make the guy that updates the db
for
(
int
i
=
4
;
i
<
4
+
cli_args
->
num_update_threads
;
++
i
)
{
for
(
int
i
=
5
;
i
<
5
+
cli_args
->
num_update_threads
;
++
i
)
{
myargs
[
i
].
operation_extra
=
&
uoe
;
myargs
[
i
].
operation
=
update_op
;
}
// make the guy that does point queries
for
(
int
i
=
4
+
cli_args
->
num_update_threads
;
i
<
num_threads
;
i
++
)
{
for
(
int
i
=
5
+
cli_args
->
num_update_threads
;
i
<
num_threads
;
i
++
)
{
myargs
[
i
].
operation
=
ptquery_op
;
}
run_workers
(
myargs
,
num_threads
,
cli_args
->
num_seconds
,
false
,
cli_args
);
...
...
src/tests/threaded_stress_test_helpers.h
View file @
7c03c648
...
...
@@ -1077,6 +1077,16 @@ static int UU() keyrange_op(DB_TXN *txn, ARG arg, void* UU(operation_extra), voi
return
r
;
}
static
int
UU
()
frag_op
(
DB_TXN
*
UU
(
txn
),
ARG
arg
,
void
*
UU
(
operation_extra
),
void
*
UU
(
stats_extra
))
{
int
db_index
=
myrandom_r
(
arg
->
random_data
)
%
arg
->
cli
->
num_DBs
;
DB
*
db
=
arg
->
dbp
[
db_index
];
TOKU_DB_FRAGMENTATION_S
frag
;
int
r
=
db
->
get_fragmentation
(
db
,
&
frag
);
invariant_zero
(
r
);
return
r
;
}
static
void
UU
()
get_key_after_bytes_callback
(
const
DBT
*
UU
(
end_key
),
uint64_t
UU
(
skipped
),
void
*
UU
(
extra
))
{
// nothing
}
...
...
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