Skip to content

Commit

Permalink
Merge pull request #269 from atlassian/release/3.0.1
Browse files Browse the repository at this point in the history
Release 3.0.1
  • Loading branch information
ometelytsia committed Jul 8, 2020
2 parents a6789ce + e0c6cd4 commit a310c6d
Show file tree
Hide file tree
Showing 14 changed files with 75 additions and 721 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ This repository contains Taurus scripts for performance testing of Atlassian Dat

## Supported versions
* Supported Jira versions:
* Jira [Enterprise Releases](https://confluence.atlassian.com/enterprise/atlassian-enterprise-releases-948227420.html): 7.13.6 and 8.5.0
* Jira Platform Release: 8.0.3
* Jira [Long Term Support release](https://confluence.atlassian.com/enterprise/atlassian-enterprise-releases-948227420.html): 7.13.6 and 8.5.0
* Jira Platform release: 8.0.3

* Supported Confluence versions:
* Confluence [Enterprise Release](https://confluence.atlassian.com/enterprise/atlassian-enterprise-releases-948227420.html): 6.13.8
* Confluence Platform Release: 7.0.4
* Confluence [Long Term Support release](https://confluence.atlassian.com/enterprise/atlassian-enterprise-releases-948227420.html): 6.13.8
* Confluence Platform release: 7.0.4

* Supported Bitbucket Server versions:
* Bitbucket Server [Enterprise Release](https://confluence.atlassian.com/enterprise/atlassian-enterprise-releases-948227420.html): 6.10.0
* Bitbucket Server Platform Release: 7.0.0
* Bitbucket Server [Long Term Support release](https://confluence.atlassian.com/enterprise/atlassian-enterprise-releases-948227420.html): 6.10.0
* Bitbucket Server Platform release: 7.0.0

## Support
In case of technical questions, issues or problems with DC Apps Performance Toolkit, contact us for support in the [community Slack](http://bit.ly/dcapt_slack) **#data-center-app-performance-toolkit** channel.
Expand Down
657 changes: 2 additions & 655 deletions app/jmeter/jira.jmx

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion app/selenium_ui/jira/pages/selectors.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ class SearchLocators:

search_issue_table = (By.ID, "issuetable")
search_issue_content = (By.ID, "issue-content")
search_no_issue_found = (By.ID, "issue-content")
search_no_issue_found = (By.CLASS_NAME, "no-results-message")


class BoardsListLocators:
Expand Down
10 changes: 2 additions & 8 deletions app/util/analytics/application_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,7 @@ def version(self):

@property
def nodes_count(self):
html_pattern = '<td><strong>Nodestate:</strong></td><td>Active</td>'
if self.version >= '8.1.0':
return len(self.client.get_nodes_info_via_rest())
else:
jira_system_page = self.client.get_system_info_page()
node_count = jira_system_page.replace(' ', '').replace('\n', '').count(html_pattern)
return node_count
return self.client.get_cluster_nodes_count(jira_version=self.version)

def __issues_count(self):
return self.client.get_total_issues_count()
Expand All @@ -57,7 +51,7 @@ def version(self):

@property
def nodes_count(self):
return len(self.client.get_confluence_nodes_count())
return self.client.get_confluence_nodes_count()

@property
def dataset_information(self):
Expand Down
8 changes: 4 additions & 4 deletions app/util/api/abstract_clients.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ def session(self):
def base_auth(self):
return self.user, self.password

def get(self, url: str, error_msg: str):
def get(self, url: str, error_msg: str, expected_status_codes: list = None):
response = self.session.get(url, auth=self.base_auth, verify=False, timeout=self.requests_timeout)
self.__verify_response(response, error_msg)
self.__verify_response(response, error_msg, expected_status_codes)
return response

def post(self, url: str, error_msg: str, body: dict = None, params=None):
Expand All @@ -76,8 +76,8 @@ def put(self, url: str, error_msg: str, body: dict = None, params=None):
self.__verify_response(response, error_msg)
return response

def __verify_response(self, response: Response, error_msg: str):
if response.ok:
def __verify_response(self, response: Response, error_msg: str, expected_status_codes: list = None):
if response.ok or response.status_code in expected_status_codes:
return

status_code = response.status_code
Expand Down
12 changes: 7 additions & 5 deletions app/util/api/bitbucket_clients.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from enum import Enum

from util.api.abstract_clients import RestClient
import lxml.html as LH
from lxml import html

BATCH_SIZE_PROJECTS = 100
BATCH_SIZE_USERS = 100
Expand Down Expand Up @@ -151,9 +151,11 @@ def get_bitbucket_system_page(self):
return r.content.decode('utf-8')

def get_locale(self):
page = LH.parse(self.host)
language = None
page = self.get(self.host, "Could not get page content.").content
tree = html.fromstring(page)
try:
language = page.xpath('//html/@lang')[0]
except Exception:
raise Exception('Could not get user locale')
language = tree.xpath('//html/@lang')[0]
except Exception as error:
print(f"Warning: Could not get user locale: {error}")
return language
21 changes: 12 additions & 9 deletions app/util/api/confluence_clients.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import xmlrpc.client

from util.api.abstract_clients import RestClient, Client
import xml.etree.ElementTree as ET
import lxml.html as LH
from lxml import html

BATCH_SIZE_SEARCH = 500

Expand Down Expand Up @@ -89,7 +88,7 @@ def get_confluence_version(self):
version = ''
api_url = f'{self.host}/rest/applinks/1.0/manifest'
response = self.get(api_url, 'Could not get Confluence manifest')
tree = ET.fromstring(response.content)
tree = html.fromstring(response.content)
for child in tree:
if child.tag == 'version':
version = child.text
Expand Down Expand Up @@ -132,8 +131,10 @@ def is_remote_api_enabled(self):

def get_confluence_nodes_count(self):
api_url = f"{self.host}/rest/atlassian-cluster-monitoring/cluster/nodes"
response = self.get(api_url, error_msg='Could not get Confluence nodes count via API')
return response.json()
response = self.get(api_url, error_msg='Could not get Confluence nodes count via API',
expected_status_codes=[200, 500])
return 'Server' if response.status_code == 500 and 'NonClusterMonitoring' in response.text\
else len(response.json())

def get_total_pages_count(self):
api_url = f"{self.host}/rest/api/search?cql=type=page"
Expand All @@ -146,11 +147,13 @@ def get_collaborative_editing_status(self):
return response.json()

def get_locale(self):
page = LH.parse(self.host)
language = None
page = self.get(self.host, "Could not get page content.").content
tree = html.fromstring(page)
try:
language = page.xpath('.//meta[@name="ajs-user-locale"]/@content')[0]
except Exception:
raise Exception('Could not get user locale')
language = tree.xpath('.//meta[@name="ajs-user-locale"]/@content')[0]
except Exception as error:
print(f"Warning: Could not get user locale: {error}")
return language


Expand Down
22 changes: 16 additions & 6 deletions app/util/api/jira_clients.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,12 +158,13 @@ def get_server_info(self):

return response.json()

def get_nodes_info_via_rest(self):
def get_nodes_count_via_rest(self):
# Works for Jira version >= 8.1.0
api_url = f'{self.host}/rest/api/2/cluster/nodes'
response = self.get(api_url, 'Could not get Jira nodes count')

return response.json()
response = self.get(api_url, 'Could not get Jira nodes count', expected_status_codes=[200, 405])
if response.status_code == 405 and 'This Jira instance is not clustered' in response.text:
return 'Server'
return len(response.json())

def get_system_info_page(self):
session = self._session
Expand All @@ -187,10 +188,19 @@ def get_system_info_page(self):
session.post(url=login_url, data=login_body, headers=headers)
auth_request = session.post(url=auth_url, data=auth_body, headers=headers)
system_info_html = auth_request.content.decode("utf-8")
if 'Cluster nodes' not in system_info_html:
print('Could not get Jira nodes count via parse html page')
return system_info_html

def get_cluster_nodes_count(self, jira_version):
html_pattern = '<td><strong>Nodestate:</strong></td><td>Active</td>'
if jira_version >= '8.1.0':
return self.get_nodes_count_via_rest()
else:
jira_system_page = self.get_system_info_page()
nodes_count = jira_system_page.replace(' ', '').replace('\n', '').count(html_pattern)
if nodes_count == 0:
return 'Server'
return nodes_count

def get_locale(self):
api_url = f'{self.host}/rest/api/2/myself'
user_properties = self.get(api_url, "Could not retrieve user")
Expand Down
2 changes: 1 addition & 1 deletion app/util/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from util.project_paths import JIRA_YML, CONFLUENCE_YML, BITBUCKET_YML

TOOLKIT_VERSION = '3.0.0'
TOOLKIT_VERSION = '3.0.1'


def read_yml_file(file):
Expand Down
2 changes: 1 addition & 1 deletion app/util/data_preparation/bitbucket_prepare_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def write_test_data_to_files(datasets):

def __check_current_language(bitbucket_api):
language = bitbucket_api.get_locale()
if language != ENGLISH:
if language and language != ENGLISH:
raise SystemExit(f'"{language}" language is not supported. '
f'Please change your account language to "English (United States)"')

Expand Down
6 changes: 3 additions & 3 deletions app/util/data_preparation/confluence_prepare_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def __is_collaborative_editing_enabled(confluence_api):

def __check_current_language(confluence_api):
language = confluence_api.get_locale()
if language not in [ENGLISH_US, ENGLISH_GB]:
if language and language not in [ENGLISH_US, ENGLISH_GB]:
raise SystemExit(f'"{language}" language is not supported. '
f'Please change your profile language to "English (US)"')

Expand All @@ -126,12 +126,12 @@ def main():
rest_client = ConfluenceRestClient(url, CONFLUENCE_SETTINGS.admin_login, CONFLUENCE_SETTINGS.admin_password)
rpc_client = ConfluenceRpcClient(url, CONFLUENCE_SETTINGS.admin_login, CONFLUENCE_SETTINGS.admin_password)

__is_remote_api_enabled(rest_client)

__is_collaborative_editing_enabled(rest_client)

__check_current_language(rest_client)

__is_remote_api_enabled(rest_client)

dataset = __create_data_set(rest_client, rpc_client)
write_test_data_to_files(dataset)

Expand Down
4 changes: 2 additions & 2 deletions docs/dc-apps-performance-toolkit-user-guide-bitbucket.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ All important parameters are listed and described in this section. For all other

The Data Center App Performance Toolkit officially supports:

- Bitbucket Platform Release version: 7.0.0
- Bitbucket [Enterprise Releases](https://confluence.atlassian.com/enterprise/atlassian-enterprise-releases-948227420.html): 6.10.0
- Bitbucket Platform release version: 7.0.0
- Bitbucket [Long Term Support releases](https://confluence.atlassian.com/enterprise/atlassian-enterprise-releases-948227420.html): 6.10.0

**Cluster nodes**

Expand Down
6 changes: 3 additions & 3 deletions docs/dc-apps-performance-toolkit-user-guide-confluence.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ All important parameters are listed and described in this section. For all other

The Data Center App Performance Toolkit officially supports:

- Confluence Platform Release version: 7.0.4
- Confluence [Enterprise Release](https://confluence.atlassian.com/enterprise/atlassian-enterprise-releases-948227420.html): 6.13.8
- Confluence Platform release version: 7.0.4
- Confluence [Long Term Support release](https://confluence.atlassian.com/enterprise/atlassian-enterprise-releases-948227420.html): 6.13.8

**Cluster nodes**

Expand All @@ -84,7 +84,7 @@ The Data Center App Performance Toolkit framework is also set up for concurrency

| Parameter | Recommended Value |
| --------- | ----------------- |
| Database instance class | [db.m4.xlarge](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.DBInstanceClass.html#Concepts.DBInstanceClass.Summary) |
| Database instance class | [db.m5.xlarge](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.DBInstanceClass.html#Concepts.DBInstanceClass.Summary) |
| RDS Provisioned IOPS | 1000 |
| Master (admin) password | Password1! |
| Enable RDS Multi-AZ deployment | true |
Expand Down
32 changes: 15 additions & 17 deletions docs/dc-apps-performance-toolkit-user-guide-jira.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ All important parameters are listed and described in this section. For all other

The Data Center App Performance Toolkit officially supports:

- Jira Platform Release version: 8.0.3
- Jira [Enterprise Releases](https://confluence.atlassian.com/enterprise/atlassian-enterprise-releases-948227420.html): 7.13.6 and 8.5.0
- Jira Platform release version: 8.0.3
- Jira [Long Term Support release](https://confluence.atlassian.com/enterprise/atlassian-enterprise-releases-948227420.html): 7.13.6 and 8.5.0

**Cluster nodes**

Expand All @@ -84,7 +84,7 @@ The Data Center App Performance Toolkit framework is also set up for concurrency

| Parameter | Recommended Value |
| --------- | ----------------- |
| Database instance class | [db.m5.large](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.DBInstanceClass.html#Concepts.DBInstanceClass.Summary) |
| Database instance class | [db.m5.xlarge](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.DBInstanceClass.html#Concepts.DBInstanceClass.Summary) |
| RDS Provisioned IOPS | 1000 |
| Master (admin) password | Password1! |
| Enable RDS Multi-AZ deployment | true |
Expand Down Expand Up @@ -309,14 +309,16 @@ After [Importing the main dataset](#importingdataset), you'll now have to pre-lo
Do not close or interrupt the session. It will take about two hours to upload attachments to Elastic File Storage (EFS).
{{% /note %}}

### <a id="reindexing"></a> Re-indexing Jira Data Center (~1 hour)
### <a id="reindexing"></a> Re-indexing Jira Data Center (~30 min)

For more information, go to [Re-indexing Jira](https://confluence.atlassian.com/adminjiraserver/search-indexing-938847710.html).

1. Log in as a user with the **Jira System Administrators** [global permission](https://confluence.atlassian.com/adminjiraserver/managing-global-permissions-938847142.html).
1. Go to **![cog icon](/platform/marketplace/images/cog.png) &gt; System &gt; Indexing**.
1. Select the **Lock one Jira node and rebuild index** option.
1. Select the **Full re-index** option.
1. Click **Re-Index** and wait until re-indexing is completed.
1. **Take a screenshot of the acknowledgment screen** displaying the re-index time and Lucene index timing.
1. Attach the screenshot to your DCHELP ticket.

Jira will be unavailable for some time during the re-indexing process. When finished, the **Acknowledge** button will be available on the re-indexing page.

Expand Down Expand Up @@ -405,28 +407,24 @@ Review `results_summary.log` file under artifacts dir location. Make sure that o

#### <a id="regressionrun2"></a> Run 2 (~50 min + Lucene Index timing test)

If you are submitting a Jira app, you are required to conduct a Lucene Index timing test. This involves conducting a foreground re-index on a single-node Data Center deployment (without and with your app installed) and a dataset that has 1M issues.

First, benchmark your re-index time without your app installed:
If you are submitting a Jira app, you are required to conduct a Lucene Index timing test. This involves conducting a foreground re-index on a single-node Data Center deployment (with your app installed) and a dataset that has 1M issues.

{{% note %}}
Jira 7 index time for 1M issues on a User Guide [recommended configuration](#quick-start-parameters) is about ~100 min, Jira 8 index time is about ~40 min.
Jira 7 index time for 1M issues on a User Guide [recommended configuration](#quick-start-parameters) is about ~100 min, Jira 8 index time is about ~30 min.
{{% /note %}}

1. Go to **![cog icon](/platform/marketplace/images/cog.png) &gt; System &gt; Indexing**.
1. Select the **Lock one Jira node and rebuild index** option.
1. Click **Re-Index** and wait until re-indexing is completed.
1. **Take a screenshot of the acknowledgment screen** displaying the re-index time and Lucene index timing.
1. Attach the screenshot to your DC HELP ticket.
{{% note %}}
If your Amazon RDS DB instance class is lower then db.m5.xlarge it is required to wait ~2 hours after previous reindex finish before starting a new one.
{{% /note %}}

Next, benchmark your re-index time with your app installed:
Benchmark your re-index time with your app installed:

1. Install the app you want to test.
1. Go to **![cog icon](/platform/marketplace/images/cog.png) &gt; System &gt; Indexing**.
1. Select the **Lock one Jira node and rebuild index** option.
1. Select the **Full re-index** option.
1. Click **Re-Index** and wait until re-indexing is completed.
1. **Take a screenshot of the acknowledgment screen** displaying the re-index time and Lucene index timing.
1. Attach the screenshot to your DC HELP ticket.
1. Attach the screenshot to your DCHELP ticket.

After attaching both screenshots to your DC HELP ticket, move on to performance results generation with an app installed:

Expand Down

0 comments on commit a310c6d

Please sign in to comment.