benchmarker.py 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744
  1. from setup.linux.installer import Installer
  2. from benchmark import framework_test
  3. import os
  4. import json
  5. import subprocess
  6. import time
  7. import textwrap
  8. import pprint
  9. import csv
  10. import sys
  11. import logging
  12. from datetime import datetime
  13. class Benchmarker:
  14. ##########################################################################################
  15. # Public methods
  16. ##########################################################################################
  17. ############################################################
  18. # Prints all the available tests
  19. ############################################################
  20. def run_list_tests(self):
  21. all_tests = self.__gather_tests
  22. for test in all_tests:
  23. print test.name
  24. self.__finish()
  25. ############################################################
  26. # End run_list_tests
  27. ############################################################
  28. ############################################################
  29. # Prints the metadata for all the available tests
  30. ############################################################
  31. def run_list_test_metadata(self):
  32. all_tests = self.__gather_tests
  33. all_tests_json = json.dumps(map(lambda test: {
  34. "name": test.name,
  35. "approach": test.approach,
  36. "classification": test.classification,
  37. "database": test.database,
  38. "framework": test.framework,
  39. "language": test.language,
  40. "orm": test.orm,
  41. "platform": test.platform,
  42. "webserver": test.webserver,
  43. "os": test.os,
  44. "database_os": test.database_os,
  45. "display_name": test.display_name,
  46. "notes": test.notes,
  47. "versus": test.versus
  48. }, all_tests))
  49. with open(os.path.join(self.full_results_directory(), "test_metadata.json"), "w") as f:
  50. f.write(all_tests_json)
  51. self.__finish()
  52. ############################################################
  53. # End run_list_test_metadata
  54. ############################################################
  55. ############################################################
  56. # parse_timestamp
  57. # Re-parses the raw data for a given timestamp
  58. ############################################################
  59. def parse_timestamp(self):
  60. all_tests = self.__gather_tests
  61. for test in all_tests:
  62. test.parse_all()
  63. self.__parse_results(all_tests)
  64. self.__finish()
  65. ############################################################
  66. # End parse_timestamp
  67. ############################################################
  68. ############################################################
  69. # Run the tests:
  70. # This process involves setting up the client/server machines
  71. # with any necessary change. Then going through each test,
  72. # running their setup script, verifying the URLs, and
  73. # running benchmarks against them.
  74. ############################################################
  75. def run(self):
  76. ##########################
  77. # Get a list of all known
  78. # tests that we can run.
  79. ##########################
  80. all_tests = self.__gather_tests
  81. ##########################
  82. # Setup client/server
  83. ##########################
  84. print textwrap.dedent("""
  85. =====================================================
  86. Preparing Server, Database, and Client ...
  87. =====================================================
  88. """)
  89. self.__setup_server()
  90. self.__setup_database()
  91. self.__setup_client()
  92. ##########################
  93. # Run tests
  94. ##########################
  95. self.__run_tests(all_tests)
  96. ##########################
  97. # Parse results
  98. ##########################
  99. if self.mode == "benchmark":
  100. print textwrap.dedent("""
  101. =====================================================
  102. Parsing Results ...
  103. =====================================================
  104. """)
  105. self.__parse_results(all_tests)
  106. self.__finish()
  107. ############################################################
  108. # End run
  109. ############################################################
  110. ############################################################
  111. # database_sftp_string(batch_file)
  112. # generates a fully qualified URL for sftp to database
  113. ############################################################
  114. def database_sftp_string(self, batch_file):
  115. sftp_string = "sftp -oStrictHostKeyChecking=no "
  116. if batch_file != None: sftp_string += " -b " + batch_file + " "
  117. if self.database_identity_file != None:
  118. sftp_string += " -i " + self.database_identity_file + " "
  119. return sftp_string + self.database_user + "@" + self.database_host
  120. ############################################################
  121. # End database_sftp_string
  122. ############################################################
  123. ############################################################
  124. # client_sftp_string(batch_file)
  125. # generates a fully qualified URL for sftp to client
  126. ############################################################
  127. def client_sftp_string(self, batch_file):
  128. sftp_string = "sftp -oStrictHostKeyChecking=no "
  129. if batch_file != None: sftp_string += " -b " + batch_file + " "
  130. if self.client_identity_file != None:
  131. sftp_string += " -i " + self.client_identity_file + " "
  132. return sftp_string + self.client_user + "@" + self.client_host
  133. ############################################################
  134. # End client_sftp_string
  135. ############################################################
  136. ############################################################
  137. # generate_url(url, port)
  138. # generates a fully qualified URL for accessing a test url
  139. ############################################################
  140. def generate_url(self, url, port):
  141. return self.server_host + ":" + str(port) + url
  142. ############################################################
  143. # End generate_url
  144. ############################################################
  145. ############################################################
  146. # output_file(test_name, test_type)
  147. # returns the output file for this test_name and test_type
  148. # timestamp/test_type/test_name/raw
  149. ############################################################
  150. def output_file(self, test_name, test_type):
  151. path = os.path.join(self.result_directory, self.timestamp, test_type, test_name, "raw")
  152. try:
  153. os.makedirs(os.path.dirname(path))
  154. except OSError:
  155. pass
  156. return path
  157. ############################################################
  158. # End output_file
  159. ############################################################
  160. ############################################################
  161. # full_results_directory
  162. ############################################################
  163. def full_results_directory(self):
  164. path = os.path.join(self.result_directory, self.timestamp)
  165. try:
  166. os.makedirs(path)
  167. except OSError:
  168. pass
  169. return path
  170. ############################################################
  171. # End output_file
  172. ############################################################
  173. ############################################################
  174. # Latest intermediate results dirctory
  175. ############################################################
  176. def latest_results_directory(self):
  177. path = os.path.join(self.result_directory,"latest")
  178. try:
  179. os.makedirs(path)
  180. except OSError:
  181. pass
  182. return path
  183. ############################################################
  184. # report_results
  185. ############################################################
  186. def report_results(self, framework, test, results):
  187. if test not in self.results['rawData'].keys():
  188. self.results['rawData'][test] = dict()
  189. self.results['rawData'][test][framework.name] = results
  190. ############################################################
  191. # End report_results
  192. ############################################################
  193. ##########################################################################################
  194. # Private methods
  195. ##########################################################################################
  196. ############################################################
  197. # Gathers all the tests
  198. ############################################################
  199. @property
  200. def __gather_tests(self):
  201. tests = []
  202. # Loop through each directory (we assume we're being run from the benchmarking root)
  203. # and look for the files that signify a benchmark test
  204. for dirname, dirnames, filenames in os.walk('.'):
  205. # Look for the benchmark_config file, this will set up our tests.
  206. # Its format looks like this:
  207. #
  208. # {
  209. # "framework": "nodejs",
  210. # "tests": [{
  211. # "default": {
  212. # "setup_file": "setup",
  213. # "json_url": "/json"
  214. # },
  215. # "mysql": {
  216. # "setup_file": "setup",
  217. # "db_url": "/mysql",
  218. # "query_url": "/mysql?queries="
  219. # },
  220. # ...
  221. # }]
  222. # }
  223. if 'benchmark_config' in filenames:
  224. config = None
  225. config_file_name = os.path.join(dirname, 'benchmark_config')
  226. with open(config_file_name, 'r') as config_file:
  227. # Load json file into config object
  228. try:
  229. config = json.load(config_file)
  230. except:
  231. print("Error loading '%s'." % config_file_name)
  232. raise
  233. if config == None:
  234. continue
  235. tests = tests + framework_test.parse_config(config, dirname[2:], self)
  236. tests.sort(key=lambda x: x.name)
  237. return tests
  238. ############################################################
  239. # End __gather_tests
  240. ############################################################
  241. ############################################################
  242. # Gathers all the frameworks
  243. ############################################################
  244. def __gather_frameworks(self):
  245. frameworks = []
  246. # Loop through each directory (we assume we're being run from the benchmarking root)
  247. for dirname, dirnames, filenames in os.walk('.'):
  248. # Look for the benchmark_config file, this will contain our framework name
  249. # It's format looks like this:
  250. #
  251. # {
  252. # "framework": "nodejs",
  253. # "tests": [{
  254. # "default": {
  255. # "setup_file": "setup",
  256. # "json_url": "/json"
  257. # },
  258. # "mysql": {
  259. # "setup_file": "setup",
  260. # "db_url": "/mysql",
  261. # "query_url": "/mysql?queries="
  262. # },
  263. # ...
  264. # }]
  265. # }
  266. if 'benchmark_config' in filenames:
  267. config = None
  268. with open(os.path.join(dirname, 'benchmark_config'), 'r') as config_file:
  269. # Load json file into config object
  270. config = json.load(config_file)
  271. if config == None:
  272. continue
  273. frameworks.append(str(config['framework']))
  274. return frameworks
  275. ############################################################
  276. # End __gather_frameworks
  277. ############################################################
  278. ############################################################
  279. # Makes any necessary changes to the server that should be
  280. # made before running the tests. This involves setting kernal
  281. # settings to allow for more connections, or more file
  282. # descriptiors
  283. #
  284. # http://redmine.lighttpd.net/projects/weighttp/wiki#Troubleshooting
  285. ############################################################
  286. def __setup_server(self):
  287. try:
  288. if os.name == 'nt':
  289. return True
  290. subprocess.check_call(["sudo","bash","-c","cd /sys/devices/system/cpu; ls -d cpu*|while read x; do echo performance > $x/cpufreq/scaling_governor; done"])
  291. subprocess.check_call("sudo sysctl -w net.core.somaxconn=5000".rsplit(" "))
  292. subprocess.check_call("sudo -s ulimit -n 16384".rsplit(" "))
  293. subprocess.check_call("sudo sysctl net.ipv4.tcp_tw_reuse=1".rsplit(" "))
  294. subprocess.check_call("sudo sysctl net.ipv4.tcp_tw_recycle=1".rsplit(" "))
  295. subprocess.check_call("sudo sysctl -w kernel.shmmax=134217728".rsplit(" "))
  296. subprocess.check_call("sudo sysctl -w kernel.shmall=2097152".rsplit(" "))
  297. except subprocess.CalledProcessError:
  298. return False
  299. ############################################################
  300. # End __setup_server
  301. ############################################################
  302. ############################################################
  303. # Makes any necessary changes to the database machine that
  304. # should be made before running the tests. Is very similar
  305. # to the server setup, but may also include database specific
  306. # changes.
  307. ############################################################
  308. def __setup_database(self):
  309. p = subprocess.Popen(self.database_ssh_string, stdin=subprocess.PIPE, shell=True)
  310. p.communicate("""
  311. sudo sysctl -w net.core.somaxconn=5000
  312. sudo -s ulimit -n 16384
  313. sudo sysctl net.ipv4.tcp_tw_reuse=1
  314. sudo sysctl net.ipv4.tcp_tw_recycle=1
  315. sudo sysctl -w kernel.shmmax=2147483648
  316. sudo sysctl -w kernel.shmall=2097152
  317. """)
  318. ############################################################
  319. # End __setup_database
  320. ############################################################
  321. ############################################################
  322. # Makes any necessary changes to the client machine that
  323. # should be made before running the tests. Is very similar
  324. # to the server setup, but may also include client specific
  325. # changes.
  326. ############################################################
  327. def __setup_client(self):
  328. p = subprocess.Popen(self.client_ssh_string, stdin=subprocess.PIPE, shell=True)
  329. p.communicate("""
  330. sudo sysctl -w net.core.somaxconn=5000
  331. sudo -s ulimit -n 16384
  332. sudo sysctl net.ipv4.tcp_tw_reuse=1
  333. sudo sysctl net.ipv4.tcp_tw_recycle=1
  334. sudo sysctl -w kernel.shmmax=2147483648
  335. sudo sysctl -w kernel.shmall=2097152
  336. """)
  337. ############################################################
  338. # End __setup_client
  339. ############################################################
  340. ############################################################
  341. # __run_tests
  342. # Ensures that the system has all necessary software to run
  343. # the tests. This does not include that software for the individual
  344. # test, but covers software such as curl and weighttp that
  345. # are needed.
  346. ############################################################
  347. def __run_tests(self, tests):
  348. for test in tests:
  349. if test.os.lower() != self.os.lower() or test.database_os.lower() != self.database_os.lower():
  350. # the operating system requirements of this test for the
  351. # application server or the database server don't match
  352. # our current environment
  353. continue
  354. # If the user specified which tests to run, then
  355. # we can skip over tests that are not in that list
  356. if self.test != None and test.name not in self.test:
  357. continue
  358. # If the test is in the excludes list, we skip it
  359. if self.exclude != None and test.name in self.exclude:
  360. continue
  361. # If the test does not contain an implementation of the current test-type, skip it
  362. if self.type != 'all' and not test.contains_type(self.type):
  363. continue
  364. logging.debug("self.results['frameworks'] != None: " + str(self.results['frameworks'] != None))
  365. logging.debug("test.name: " + str(test.name))
  366. logging.debug("self.results['completed']: " + str(self.results['completed']))
  367. if self.results['frameworks'] != None and test.name in self.results['completed']:
  368. logging.info('Framework %s found in latest saved data. Skipping.',str(test.name))
  369. continue
  370. print textwrap.dedent("""
  371. =====================================================
  372. Beginning {name}
  373. -----------------------------------------------------
  374. """.format(name=test.name))
  375. ##########################
  376. # Start this test
  377. ##########################
  378. print textwrap.dedent("""
  379. -----------------------------------------------------
  380. Starting {name}
  381. -----------------------------------------------------
  382. """.format(name=test.name))
  383. try:
  384. p = subprocess.Popen(self.database_ssh_string, stdin=subprocess.PIPE, shell=True)
  385. p.communicate("""
  386. sudo restart mysql
  387. sudo restart mongodb
  388. sudo /etc/init.d/postgresql restart
  389. """)
  390. time.sleep(10)
  391. result = test.start()
  392. if result != 0:
  393. test.stop()
  394. time.sleep(5)
  395. print "ERROR: Problem starting " + test.name
  396. print textwrap.dedent("""
  397. -----------------------------------------------------
  398. Stopped {name}
  399. -----------------------------------------------------
  400. """.format(name=test.name))
  401. self.__write_intermediate_results(test.name,"<setup.py>#start() returned non-zero")
  402. continue
  403. time.sleep(self.sleep)
  404. ##########################
  405. # Verify URLs
  406. ##########################
  407. print textwrap.dedent("""
  408. -----------------------------------------------------
  409. Verifying URLs for {name}
  410. -----------------------------------------------------
  411. """.format(name=test.name))
  412. test.verify_urls()
  413. ##########################
  414. # Benchmark this test
  415. ##########################
  416. if self.mode == "benchmark":
  417. print textwrap.dedent("""
  418. -----------------------------------------------------
  419. Benchmarking {name} ...
  420. -----------------------------------------------------
  421. """.format(name=test.name))
  422. test.benchmark()
  423. ##########################
  424. # Stop this test
  425. ##########################
  426. test.stop()
  427. time.sleep(5)
  428. print textwrap.dedent("""
  429. -----------------------------------------------------
  430. Stopped {name}
  431. -----------------------------------------------------
  432. """.format(name=test.name))
  433. time.sleep(5)
  434. ##########################################################
  435. # Save results thus far into toolset/benchmark/latest.json
  436. ##########################################################
  437. print textwrap.dedent("""
  438. ----------------------------------------------------
  439. Saving results through {name}
  440. ----------------------------------------------------
  441. """.format(name=test.name))
  442. self.__write_intermediate_results(test.name,time.strftime("%Y%m%d%H%M%S", time.localtime()))
  443. except (OSError, subprocess.CalledProcessError):
  444. self.__write_intermediate_results(test.name,"<setup.py> raised an exception")
  445. print textwrap.dedent("""
  446. -----------------------------------------------------
  447. Subprocess Error {name}
  448. -----------------------------------------------------
  449. """.format(name=test.name))
  450. try:
  451. test.stop()
  452. except (subprocess.CalledProcessError):
  453. self.__write_intermediate_results(test.name,"<setup.py>#stop() raised an error")
  454. print textwrap.dedent("""
  455. -----------------------------------------------------
  456. Subprocess Error: Test .stop() raised exception {name}
  457. -----------------------------------------------------
  458. """.format(name=test.name))
  459. except (KeyboardInterrupt, SystemExit):
  460. test.stop()
  461. print """
  462. -----------------------------------------------------
  463. Cleaning up....
  464. -----------------------------------------------------
  465. """
  466. self.__finish()
  467. sys.exit()
  468. ############################################################
  469. # End __run_tests
  470. ############################################################
  471. ############################################################
  472. # __parse_results
  473. # Ensures that the system has all necessary software to run
  474. # the tests. This does not include that software for the individual
  475. # test, but covers software such as curl and weighttp that
  476. # are needed.
  477. ############################################################
  478. def __parse_results(self, tests):
  479. # Run the method to get the commmit count of each framework.
  480. self.__count_commits()
  481. # Call the method which counts the sloc for each framework
  482. self.__count_sloc()
  483. # Time to create parsed files
  484. # Aggregate JSON file
  485. with open(os.path.join(self.full_results_directory(), "results.json"), "w") as f:
  486. f.write(json.dumps(self.results))
  487. ############################################################
  488. # End __parse_results
  489. ############################################################
  490. #############################################################
  491. # __count_sloc
  492. # This is assumed to be run from the benchmark root directory
  493. #############################################################
  494. def __count_sloc(self):
  495. all_frameworks = self.__gather_frameworks()
  496. jsonResult = {}
  497. for framework in all_frameworks:
  498. try:
  499. command = "cloc --list-file=" + framework['directory'] + "/source_code --yaml"
  500. lineCount = subprocess.check_output(command, shell=True)
  501. # Find the last instance of the word 'code' in the yaml output. This should
  502. # be the line count for the sum of all listed files or just the line count
  503. # for the last file in the case where there's only one file listed.
  504. lineCount = lineCount[lineCount.rfind('code'):len(lineCount)]
  505. lineCount = lineCount.strip('code: ')
  506. lineCount = lineCount[0:lineCount.rfind('comment')]
  507. jsonResult[framework['name']] = int(lineCount)
  508. except:
  509. continue
  510. self.results['rawData']['slocCounts'] = jsonResult
  511. ############################################################
  512. # End __count_sloc
  513. ############################################################
  514. ############################################################
  515. # __count_commits
  516. ############################################################
  517. def __count_commits(self):
  518. all_frameworks = self.__gather_frameworks()
  519. jsonResult = {}
  520. for framework in all_frameworks:
  521. try:
  522. command = "git rev-list HEAD -- " + framework + " | sort -u | wc -l"
  523. commitCount = subprocess.check_output(command, shell=True)
  524. jsonResult[framework] = int(commitCount)
  525. except:
  526. continue
  527. self.results['rawData']['commitCounts'] = jsonResult
  528. self.commits = jsonResult
  529. ############################################################
  530. # End __count_commits
  531. ############################################################
  532. ############################################################
  533. # __write_intermediate_results
  534. ############################################################
  535. def __write_intermediate_results(self,test_name,status_message):
  536. try:
  537. self.results["completed"][test_name] = status_message
  538. with open(os.path.join(self.latest_results_directory, 'results.json'), 'w') as f:
  539. f.write(json.dumps(self.results))
  540. except (IOError):
  541. logging.error("Error writing results.json")
  542. ############################################################
  543. # End __write_intermediate_results
  544. ############################################################
  545. ############################################################
  546. # __finish
  547. ############################################################
  548. def __finish(self):
  549. print "Time to complete: " + str(int(time.time() - self.start_time)) + " seconds"
  550. print "Results are saved in " + os.path.join(self.result_directory, self.timestamp)
  551. ############################################################
  552. # End __finish
  553. ############################################################
  554. ##########################################################################################
  555. # Constructor
  556. ##########################################################################################
  557. ############################################################
  558. # Initialize the benchmarker. The args are the arguments
  559. # parsed via argparser.
  560. ############################################################
  561. def __init__(self, args):
  562. self.__dict__.update(args)
  563. self.start_time = time.time()
  564. # setup logging
  565. logging.basicConfig(stream=sys.stderr, level=logging.DEBUG)
  566. # setup some additional variables
  567. if self.database_user == None: self.database_user = self.client_user
  568. if self.database_host == None: self.database_host = self.client_host
  569. if self.database_identity_file == None: self.database_identity_file = self.client_identity_file
  570. # setup results and latest_results directories
  571. self.result_directory = os.path.join("results", self.name)
  572. self.latest_results_directory = self.latest_results_directory()
  573. if self.parse != None:
  574. self.timestamp = self.parse
  575. else:
  576. self.timestamp = time.strftime("%Y%m%d%H%M%S", time.localtime())
  577. # Setup the concurrency levels array. This array goes from
  578. # starting_concurrency to max concurrency, doubling each time
  579. self.concurrency_levels = []
  580. concurrency = self.starting_concurrency
  581. while concurrency <= self.max_concurrency:
  582. self.concurrency_levels.append(concurrency)
  583. concurrency = concurrency * 2
  584. # Setup query interval array
  585. # starts at 1, and goes up to max_queries, using the query_interval
  586. self.query_intervals = []
  587. queries = 1
  588. while queries <= self.max_queries:
  589. self.query_intervals.append(queries)
  590. if queries == 1:
  591. queries = 0
  592. queries = queries + self.query_interval
  593. # Load the latest data
  594. #self.latest = None
  595. #try:
  596. # with open('toolset/benchmark/latest.json', 'r') as f:
  597. # # Load json file into config object
  598. # self.latest = json.load(f)
  599. # logging.info("toolset/benchmark/latest.json loaded to self.latest")
  600. # logging.debug("contents of latest.json: " + str(json.dumps(self.latest)))
  601. #except IOError:
  602. # logging.warn("IOError on attempting to read toolset/benchmark/latest.json")
  603. #
  604. #self.results = None
  605. #try:
  606. # if self.latest != None and self.name in self.latest.keys():
  607. # with open(os.path.join(self.result_directory, str(self.latest[self.name]), 'results.json'), 'r') as f:
  608. # # Load json file into config object
  609. # self.results = json.load(f)
  610. #except IOError:
  611. # pass
  612. self.results = None
  613. try:
  614. with open(os.path.join(self.latest_results_directory, 'results.json'), 'r') as f:
  615. #Load json file into results object
  616. self.results = json.load(f)
  617. except IOError:
  618. logging.warn("results.json for test %s not found.",self.name)
  619. if self.results == None:
  620. self.results = dict()
  621. self.results['name'] = self.name
  622. self.results['concurrencyLevels'] = self.concurrency_levels
  623. self.results['queryIntervals'] = self.query_intervals
  624. self.results['frameworks'] = [t.name for t in self.__gather_tests]
  625. self.results['duration'] = self.duration
  626. self.results['rawData'] = dict()
  627. self.results['rawData']['json'] = dict()
  628. self.results['rawData']['db'] = dict()
  629. self.results['rawData']['query'] = dict()
  630. self.results['rawData']['fortune'] = dict()
  631. self.results['rawData']['update'] = dict()
  632. self.results['rawData']['plainteat'] = dict()
  633. self.results['completed'] = dict()
  634. else:
  635. #for x in self.__gather_tests():
  636. # if x.name not in self.results['frameworks']:
  637. # self.results['frameworks'] = self.results['frameworks'] + [x.name]
  638. # Always overwrite framework list
  639. self.results['frameworks'] = [t.name for t in self.__gather_tests]
  640. # Setup the ssh command string
  641. self.database_ssh_string = "ssh -T -o StrictHostKeyChecking=no " + self.database_user + "@" + self.database_host
  642. self.client_ssh_string = "ssh -T -o StrictHostKeyChecking=no " + self.client_user + "@" + self.client_host
  643. if self.database_identity_file != None:
  644. self.database_ssh_string = self.database_ssh_string + " -i " + self.database_identity_file
  645. if self.client_identity_file != None:
  646. self.client_ssh_string = self.client_ssh_string + " -i " + self.client_identity_file
  647. if self.install_software:
  648. install = Installer(self)
  649. install.install_software()
  650. ############################################################
  651. # End __init__
  652. ############################################################