Skip to content

Commit

Permalink
Merge pull request #105 from perftool-incubator/dev-kmr
Browse files Browse the repository at this point in the history
replace mentions of ElasticSearch with OpenSearch
  • Loading branch information
k-rister authored Jan 31, 2024
2 parents 609b531 + 55fdd69 commit 1fc4257
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions queries/cdmq/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ When contributing, apply this project's JavaScript standard style, otherwise it

- NodeJS 20.7.0
- NPM
- ElasticSearch 7.17
- OpenSearch 2.x

## Standardizing JavaScript Style

Expand Down Expand Up @@ -38,4 +38,4 @@ npx prettier *.js --check

```shell
npx prettier *.js --write
```
```
8 changes: 4 additions & 4 deletions queries/cdmq/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# cdmq

## Introduction
The contents of this directory contain a collection of scripts in Javascript intended to be executed with [node.js](https://nodejs.org). These scripts get data from an elasticsearch instance. The data must be in Common Data Format. which is documented in this project under [templates](../templates). The scripts here are meant to help inspect, compare, and export data from benchmarks and performance & resource-utilization tools, in order to report and investigate performance.
The contents of this directory contain a collection of scripts in Javascript intended to be executed with [node.js](https://nodejs.org). These scripts get data from an OpenSearch instance. The data must be in Common Data Format. which is documented in this project under [templates](../templates). The scripts here are meant to help inspect, compare, and export data from benchmarks and performance & resource-utilization tools, in order to report and investigate performance.

In order to generate this data, you must run a benchmark via automation framework which uses the Common Data Format and index that data into elasticsearch. One of those automation frameworks is the [crucible](https://github.com/perftool-incubator/crucible) project. A subproject of crucible, [crucible-examples](https://github.com/perftool-incubator/crucible-examples), includes scenarios to run some of these benchmarks.
In order to generate this data, you must run a benchmark via automation framework which uses the Common Data Format and index that data into OpenSearch. One of those automation frameworks is the [crucible](https://github.com/perftool-incubator/crucible) project. A subproject of crucible, [crucible-examples](https://github.com/perftool-incubator/crucible-examples), includes scenarios to run some of these benchmarks.

## Terms
Many of the scripts refer to different terms we associate with either running a benchmark or examining the resulting data, and these terms are not always universally known or agreed upon for specific benchmarks (like uperf and fio), or even benchmark automation frameworks, Nevertheless, the CommonDataModel project has adopted the following terms, which originate from the crucible project. You will need to become familiar with these terms in order to use these scripts:
Expand Down Expand Up @@ -228,7 +228,7 @@ So, let's use `type`, which breaks out the Gbps by virtual and physical interfac

# node ./get-metric-data.js --period 4F1014D6-AD33-11EC-94E3-ADE96E3275F7 --source sar-net --type L2-Gbps --breakout csid,cstype,type
Checking for httpd...appears to be running
Checking for elasticsearch...appears to be running
Checking for OpenSearch...appears to be running
{
"name": "sar-net",
"type": "L2-Gbps",
Expand Down Expand Up @@ -387,7 +387,7 @@ So far all of the metrics have been represented as a single value for a specific

# node ./get-metric-data.js --period 4F1014D6-AD33-11EC-94E3-ADE96E3275F7 --source sar-net --type L2-Gbps --breakout csid=1,cstype=worker,type=physical,direction=tx,dev --filter gt:0.01 --resolution 10
Checking for httpd...appears to be running
Checking for elasticsearch...appears to be running
Checking for OpenSearch...appears to be running
{
"name": "sar-net",
"type": "L2-Gbps",
Expand Down
4 changes: 2 additions & 2 deletions queries/cdmq/delete-run.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ var program = require('commander');
program
.version('0.1.0')
.option('--run <run ID>')
.option('--url <host:port>', 'The host and port of the Elasticsearch instance', 'localhost:9200')
.option('--url <host:port>', 'The host and port of the OpenSearch instance', 'localhost:9200')
.parse(process.argv);

async function waitFor(docTypes) {
Expand All @@ -16,7 +16,7 @@ async function waitFor(docTypes) {
});
let result = await promise;

console.log('\nConfirming all documents are in deleted elasticsearch (attempt #' + numAttempts + ')');
console.log('\nConfirming all documents are in deleted OpenSearch (attempt #' + numAttempts + ')');
for (let i = 0; i < docTypes.length; i++) {
var thisNumDocs = cdm.getDocCount(program.url, program.run, docTypes[i]);
console.log(' ' + docTypes[i] + ': doc count: ' + thisNumDocs);
Expand Down
2 changes: 1 addition & 1 deletion queries/cdmq/delete-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# metric_source, list the metric_types (like L2-Gbps). Uncomment the
# "node get-metric-data ..." lines to output a specific tool metric

# This script assumes Elasticsearch is installed on the same host
# This script assumes OpenSearch is installed on the same host
# and has data loaded from soemthing like crucible/rickshaw

project_dir=$(dirname `readlink -e $0`)
Expand Down
2 changes: 1 addition & 1 deletion queries/cdmq/get-metric-data-from-ids.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function list(val) {

program
.version('0.1.0')
.option('--url <host:port>', 'The host and port of the Elasticsearch instance')
.option('--url <host:port>', 'The host and port of the OpenSearch instance')
.option('--begin [uint]', 'Timestamp in epochtime_ms')
.option('--end [uint]', 'Timestamp in epochtime_ms')
.option('--resolution [uint]', 'The number of datapoints to produce in a data-series')
Expand Down
2 changes: 1 addition & 1 deletion queries/cdmq/get-metric-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function list(val) {

program
.version('0.1.0')
.option('--url <host:port>', 'The host and port of the Elasticsearch instance', 'localhost:9200')
.option('--url <host:port>', 'The host and port of the OpenSearch instance', 'localhost:9200')
.option('--run <uuid>', 'The UUID from the run')
.option('--period <uuid>', 'The UUID from the benchmark-iteration-sample-period')
.option('--source <name>', 'The metric source, like a tool or benchmark name (sar, fio)')
Expand Down
2 changes: 1 addition & 1 deletion queries/cdmq/get-metric-data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# metric_source, list the metric_types (like L2-Gbps). Uncomment the
# "node get-metric-data ..." lines to output a specific tool metric

# This script assumes Elasticsearch is installed on the same host
# This script assumes OpenSearch is installed on the same host
# and has data loaded from soemthing like crucible/rickshaw

project_dir=$(dirname `readlink -e $0`)
Expand Down
2 changes: 1 addition & 1 deletion queries/cdmq/get-metric-groups-from-breakout.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function list(val) {

program
.version('0.1.0')
.option('--url <host:port>', 'The host and port of the Elasticsearch instance')
.option('--url <host:port>', 'The host and port of the OpenSearch instance')
.option('--period <period ID>', 'The UUID of the period document')
.option('--source <metric source>', 'A metric source, like iostat or fio')
.option('--type <metric type>', 'A metric type, like iops or Gbps')
Expand Down
2 changes: 1 addition & 1 deletion queries/cdmq/get-result-summary.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# metric_source, list the metric_types (like L2-Gbps). Uncomment the
# "node get-metric-data ..." lines to output a specific tool metric

# This script assumes Elasticsearch is installed on the same host
# This script assumes OpenSearch is installed on the same host
# and has data loaded from soemthing like crucible/rickshaw

project_dir=$(dirname `readlink -e $0`)
Expand Down

0 comments on commit 1fc4257

Please sign in to comment.