Commit ee13f84b authored by Thomas Gambier's avatar Thomas Gambier

erp5.util: remove unused code

parent fcaa5ddd
#!/usr/bin/env python
##############################################################################
#
# Copyright (c) 2011 Nexedi SA and Contributors. All Rights Reserved.
# Arnaud Fontaine <arnaud.fontaine@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
from __future__ import print_function
from .result import CSVBenchmarkResult, NothingFlushedException
class CSVScalabilityBenchmarkResult(CSVBenchmarkResult):
def flush(self, partial=True):
try:
super(CSVScalabilityBenchmarkResult, self).flush(partial)
except NothingFlushedException:
pass
else:
self._argument_namespace.notify_method(self._result_filename,
self._result_file.tell(),
partial=partial)
from .performance_tester import PerformanceTester
class ScalabilityTester(PerformanceTester):
def preRun(self, *args, **kwargs):
pass
def postRun(self, error_message_set):
from logging import Formatter
import sys
from six.moves.urllib.request import urlencode
from six.moves.urllib.parse import urlopen
try:
urlopen("http://[%s]:%d/report" % \
(self._argument_namespace.manager_address,
self._argument_namespace.manager_port),
urlencode({'error_message_set': '|'.join(error_message_set)})).close()
except Exception:
print("ERROR: %s" % Formatter().formatException(sys.exc_info()), file=sys.stderr)
def getResultClass(self):
if not self._argument_namespace.erp5_publish_url:
return CSVScalabilityBenchmarkResult
return super(ScalabilityTester, self).getResultClass()
from slapos.tool.nosqltester import NoSQLTester
class RunScalabilityTester(NoSQLTester):
def __init__(self):
super(RunScalabilityTester, self).__init__()
def _add_parser_arguments(self, parser):
super(RunScalabilityTester, self)._add_parser_arguments(parser)
ScalabilityTester._add_parser_arguments(parser)
def _parse_arguments(self, parser):
namespace = super(RunScalabilityTester, self)._parse_arguments(parser)
ScalabilityTester._check_parsed_arguments(namespace)
namespace.notify_method = self.send_result_availability_notification
return namespace
def run_tester(self):
ScalabilityTester(self.argument_namespace).run()
def main():
RunScalabilityTester().run()
if __name__ == '__main__':
main()
...@@ -56,7 +56,6 @@ setup(name=name, ...@@ -56,7 +56,6 @@ setup(name=name,
'testbrowser': ['zope.testbrowser >= 5.0.0', 'z3c.etestbrowser'], 'testbrowser': ['zope.testbrowser >= 5.0.0', 'z3c.etestbrowser'],
'benchmark': benchmark_install_require_list, 'benchmark': benchmark_install_require_list,
'benchmark-report': [name+'[benchmark]', 'matplotlib', 'numpy'], 'benchmark-report': [name+'[benchmark]', 'matplotlib', 'numpy'],
'scalability_tester': [name+'[benchmark]', 'slapos.tool.nosqltester'],
'zodbanalyse': ['ZODB'], 'zodbanalyse': ['ZODB'],
}, },
zip_safe=True, zip_safe=True,
...@@ -67,8 +66,6 @@ setup(name=name, ...@@ -67,8 +66,6 @@ setup(name=name,
'testnode = erp5.util.testnode:main [testnode]', 'testnode = erp5.util.testnode:main [testnode]',
'performance_tester_erp5 = '\ 'performance_tester_erp5 = '\
'erp5.util.benchmark.performance_tester:main [benchmark]', 'erp5.util.benchmark.performance_tester:main [benchmark]',
'scalability_tester_erp5 = '\
'erp5.util.benchmark.scalability_tester:main [scalability_tester]',
'runScalabilityTestSuite = '\ 'runScalabilityTestSuite = '\
'erp5.util.scalability.runScalabilityTestSuite:main', 'erp5.util.scalability.runScalabilityTestSuite:main',
'requestUrl = '\ 'requestUrl = '\
......
  • mentioned in merge request slapos!1154 (merged)

    Toggle commit list
  • @tomo scalability tests seems unable to run currently.

    After looking at the recent history, I would bet it may be due to this commit. But no idea why...

    /cc @Tyagov

  • I see that testnode-COMP-3460 is a very custom testnode managed by @Tyagov but from what I could see in the log, it seems more related to the problem of missing frontends from Canary during the weekend.

    @Tyagov could you confirm this ?

  • @tomo , yes seems related (ERP5 cluster can not get a frontend). I restarted from scratch and will keep an eye on.

  • @tomo , Scalability tests runs so far (https://erp5.nexedi.net/test_result_module/20220425-23D1074C8/view?ignore_layout:int=1).

    So it was indeed a frontend issue.

Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment