Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
T
tarantool
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
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
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
core
tarantool
Commits
ff09f0c6
Commit
ff09f0c6
authored
8 years ago
by
Roman Tsisyk
Browse files
Options
Downloads
Patches
Plain Diff
phia: enable prefix compression in stress test
parent
b3cd1b9d
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/phia/stress.lua
+8
-4
8 additions, 4 deletions
test/phia/stress.lua
with
8 additions
and
4 deletions
test/phia/stress.lua
+
8
−
4
View file @
ff09f0c6
...
...
@@ -22,9 +22,13 @@ box.once("phia_stress", function()
local
s4
=
box
.
schema
.
space
.
create
(
's4'
,
{
engine
=
'phia'
,
if_not_exists
=
true
})
s4
:
create_index
(
'pk'
,
{
compression
=
'lz4'
,
compression_branch
=
'lz4'
,
amqf
=
1
,
if_not_exists
=
true
})
local
s5
=
box
.
schema
.
space
.
create
(
's5'
,
{
engine
=
'phia'
})
s5
:
create_index
(
'pk'
,
{
compression_key
=
1
,
amqf
=
1
})
end
)
local
spaces
=
{
box
.
space
.
s1
,
box
.
space
.
s2
,
box
.
space
.
s3
,
box
.
space
.
s4
}
local
spaces
=
{
box
.
space
.
s1
,
box
.
space
.
s2
,
box
.
space
.
s3
,
box
.
space
.
s4
,
box
.
space
.
s5
}
local
function
t1
(
ch
,
time_limit
)
local
t1
=
fiber
.
time
()
...
...
@@ -33,7 +37,7 @@ local function t1(ch, time_limit)
local
t
=
math.random
(
80
)
local
data
=
string.char
(
math.random
(
string.byte
(
'Z'
)
-
string.byte
(
'A'
))
+
string.byte
(
'A'
)
-
1
)
data
=
data
:
rep
(
math.random
(
20480
))
local
space
=
spaces
[
math
.
mod
(
t
,
4
)
+
1
]
local
space
=
spaces
[
math
.
mod
(
t
,
#
spaces
)
+
1
]
if
t
<
32
then
space
:
replace
({
k
,
data
})
elseif
t
<
40
then
...
...
@@ -54,7 +58,7 @@ local function t2(ch, time_limit)
while
fiber
.
time
()
-
t1
<
time_limit
do
local
k
=
math.random
(
10000
)
local
t
=
math.random
(
16
)
local
space
=
spaces
[
math
.
mod
(
t
,
4
)
+
1
]
local
space
=
spaces
[
math
.
mod
(
t
,
#
spaces
)
+
1
]
if
t
<
12
then
local
l
=
space
:
get
({
k
})
else
...
...
@@ -72,7 +76,7 @@ local function t3(ch, time_limit)
local
k
=
math.random
(
10000
)
local
t
=
math.random
(
20
)
local
l
=
math.random
(
2048
)
local
space
=
spaces
[
math
.
mod
(
t
,
4
)
+
1
]
local
space
=
spaces
[
math
.
mod
(
t
,
#
spaces
)
+
1
]
if
t
<=
6
then
space
:
select
(
k
,
{
iterator
=
'GE'
,
limit
=
l
})
elseif
t
<=
12
then
...
...
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