Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Leo Le Bouter
slapos
Commits
ab2ca104
Commit
ab2ca104
authored
Feb 05, 2018
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wendelin-scalability: add a scenario for ZBigArray processing
parent
03135189
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
217 additions
and
16 deletions
+217
-16
software/wendelin-scalability/test-neo.cfg
software/wendelin-scalability/test-neo.cfg
+27
-9
software/wendelin-scalability/test_scalability_fluentd/ExtensionTemplateItem/portal_components/extension.erp5.ScalabilityFluentd.py
...em/portal_components/extension.erp5.ScalabilityFluentd.py
+3
-3
software/wendelin-scalability/test_scalability_fluentd/ExtensionTemplateItem/portal_components/extension.erp5.ScalabilityZBigArray.py
.../portal_components/extension.erp5.ScalabilityZBigArray.py
+30
-0
software/wendelin-scalability/test_scalability_fluentd/ExtensionTemplateItem/portal_components/extension.erp5.ScalabilityZBigArray.xml
...portal_components/extension.erp5.ScalabilityZBigArray.xml
+123
-0
software/wendelin-scalability/test_scalability_fluentd/PathTemplateItem/portal_skins/custom/ERP5Site_dummyZBigArrayProcessing.xml
...portal_skins/custom/ERP5Site_dummyZBigArrayProcessing.xml
+28
-0
software/wendelin-scalability/test_scalability_fluentd/PathTemplateItem/portal_skins/custom/Module_getTotalSize.py
...thTemplateItem/portal_skins/custom/Module_getTotalSize.py
+0
-0
software/wendelin-scalability/test_scalability_fluentd/PathTemplateItem/portal_skins/custom/Module_getTotalSize.xml
...hTemplateItem/portal_skins/custom/Module_getTotalSize.xml
+1
-1
software/wendelin-scalability/test_scalability_fluentd/bt/template_extension_id_list
...ty/test_scalability_fluentd/bt/template_extension_id_list
+2
-1
software/wendelin-scalability/test_scalability_fluentd/bt/template_path_list
...calability/test_scalability_fluentd/bt/template_path_list
+3
-2
No files found.
software/wendelin-scalability/test-neo.cfg
View file @
ab2ca104
...
...
@@ -10,12 +10,15 @@
# $x 8.787 0
# 0.100036621094
# 6556
#
# The 'start_process' command is similar but by growing a ZBigArray object.
# The random data has a compression ratio of 10%.
[buildout]
extends = test-common.cfg
parts += start_ingest
parts += start_ingest
start_process
[start
_ingest
]
[start
-script-common
]
recipe = slapos.recipe.template:jinja2
rendered = ${buildout:bin-directory}/${:_buildout_section_name_}
mode = 0755
...
...
@@ -27,20 +30,35 @@ template =
_('--site-id', default='erp5')
_('hostport', metavar='host[:port]', help='Zope address')
_('password', help="'zope' user password")
_('reference', help='Data Stream reference')
_('mu', type=float)
_('sigma', type=float)
_('chunks_per_transaction', nargs='?', type=int, help='default: 128 (8 MiB)')
options = []
def option(name, **kw):
_(name, **kw)
options.append(name)
${:options}
args = parser.parse_args()
qs = []
for k in
'reference', 'mu', 'sigma', 'chunks_per_transaction'
:
for k in
options
:
v = getattr(args, k)
if v is not None:
t = type(v)
qs.append('%s=%s' % (k if t is str else k + ':' + t.__name__, v))
c = httplib.HTTPConnection(args.hostport)
c.putrequest('GET', '/%s/ERP5Site_simulateFluentdIngestion?%s'
% (args.site_id, '&'.join(qs)))
c.putrequest('GET', '/%s/${:script}?%s' % (args.site_id, '&'.join(qs)))
c.putheader('Authorization',
'Basic ' + base64.b64encode('zope:'+args.password))
c.endheaders()
[start_ingest]
<= start-script-common
options =
option('id', help='Data Stream id')
option('mu', type=float)
option('sigma', type=float)
option('chunks_per_transaction', nargs='?', type=int, help='default: 128 (8 MiB)')
script = ERP5Site_simulateFluentdIngestion
[start_process]
<= start-script-common
options =
option('id', help='Data Array id')
script = ERP5Site_dummyZBigArrayProcessing
software/wendelin-scalability/test_scalability_fluentd/ExtensionTemplateItem/portal_components/extension.erp5.ScalabilityFluentd.py
View file @
ab2ca104
...
...
@@ -5,7 +5,7 @@ from random import lognormvariate
bigfile_chunk_size
=
65536
def
simulateFluentdIngestion
(
self
,
reference
,
mu
,
sigma
,
def
simulateFluentdIngestion
(
self
,
id
,
mu
,
sigma
,
chunks_per_transaction
=
128
):
from
time
import
time
import
transaction
...
...
@@ -13,9 +13,9 @@ def simulateFluentdIngestion(self, reference, mu, sigma,
+
'/ingest'
)
module
=
self
[
'data_stream_module'
]
try
:
data_stream
=
module
[
reference
]
data_stream
=
module
[
id
]
except
KeyError
:
data_stream
=
module
.
newContent
(
reference
,
'Data Stream'
)
data_stream
=
module
.
newContent
(
id
,
'Data Stream'
)
transaction
.
commit
()
pack
=
struct
.
Struct
(
'!d'
).
pack
...
...
software/wendelin-scalability/test_scalability_fluentd/ExtensionTemplateItem/portal_components/extension.erp5.ScalabilityZBigArray.py
0 → 100644
View file @
ab2ca104
def
dummyZBigArrayProcessing
(
self
,
id
):
import
numpy
as
np
from
random
import
randrange
,
sample
import
transaction
module
=
self
[
'data_array_module'
]
try
:
array
=
module
[
id
]
except
KeyError
:
array
=
module
.
newContent
(
id
,
'Data Array'
)
array
.
initArray
(
shape
=
(
0
,
64
),
dtype
=
np
.
int32
)
transaction
.
commit
()
note
=
array
.
getPath
()
+
'/new_data'
array
=
array
.
getArray
()
rows
,
cols
=
array
.
shape
y
=
xrange
(
cols
)
n
=
10
*
(
2
<<
20
)
//
(
cols
*
4
)
z
=
np
.
ndarray
(
shape
=
(
n
,
cols
),
dtype
=
array
.
dtype
)
for
row
in
z
:
for
i
in
sample
(
y
,
8
):
row
[
i
]
=
randrange
(
0
,
1000
)
while
1
:
txn
=
transaction
.
begin
()
np
.
random
.
shuffle
(
z
)
rows
+=
n
array
.
resize
((
rows
,
cols
))
array
[
-
n
:]
=
z
txn
.
note
(
note
)
txn
.
commit
()
software/wendelin-scalability/test_scalability_fluentd/ExtensionTemplateItem/portal_components/extension.erp5.ScalabilityZBigArray.xml
0 → 100644
View file @
ab2ca104
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Extension Component"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_recorded_property_dict
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
ScalabilityZBigArray
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
extension.erp5.ScalabilityZBigArray
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Extension Component
</string>
</value>
</item>
<item>
<key>
<string>
sid
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
text_content_error_message
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
text_content_warning_message
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
version
</string>
</key>
<value>
<string>
erp5
</string>
</value>
</item>
<item>
<key>
<string>
workflow_history
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
component_validation_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAQ=
</string>
</persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"4"
aka=
"AAAAAAAAAAQ="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.patches.WorkflowTool"
/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
validate
</string>
</value>
</item>
<item>
<key>
<string>
validation_state
</string>
</key>
<value>
<string>
validated
</string>
</value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
software/wendelin-scalability/test_scalability_fluentd/PathTemplateItem/portal_skins/custom/ERP5Site_dummyZBigArrayProcessing.xml
0 → 100644
View file @
ab2ca104
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ExternalMethod"
module=
"Products.ExternalMethod.ExternalMethod"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_function
</string>
</key>
<value>
<string>
dummyZBigArrayProcessing
</string>
</value>
</item>
<item>
<key>
<string>
_module
</string>
</key>
<value>
<string>
ScalabilityZBigArray
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
ERP5Site_dummyZBigArrayProcessing
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
software/wendelin-scalability/test_scalability_fluentd/PathTemplateItem/portal_skins/custom/
DataStream
Module_getTotalSize.py
→
software/wendelin-scalability/test_scalability_fluentd/PathTemplateItem/portal_skins/custom/Module_getTotalSize.py
View file @
ab2ca104
File moved
software/wendelin-scalability/test_scalability_fluentd/PathTemplateItem/portal_skins/custom/
DataStream
Module_getTotalSize.xml
→
software/wendelin-scalability/test_scalability_fluentd/PathTemplateItem/portal_skins/custom/Module_getTotalSize.xml
View file @
ab2ca104
...
...
@@ -54,7 +54,7 @@
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
DataStream
Module_getTotalSize
</string>
</value>
<value>
<string>
Module_getTotalSize
</string>
</value>
</item>
</dictionary>
</pickle>
...
...
software/wendelin-scalability/test_scalability_fluentd/bt/template_extension_id_list
View file @
ab2ca104
extension.erp5.ScalabilityFluentd
extension.erp5.ScalabilityZBigArray
\ No newline at end of file
software/wendelin-scalability/test_scalability_fluentd/bt/template_path_list
View file @
ab2ca104
portal_ingestion_policies/scalability_test_*
portal_skins/custom/
DataStreamModule_getTotalSize
portal_skins/custom/
ERP5Site_dummyZBigArrayProcessing
portal_skins/custom/ERP5Site_handleRawDataFluentdIngestion
portal_skins/custom/ERP5Site_simulateFluentdIngestion
portal_skins/custom/Module_getTotalSize
\ No newline at end of file
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