omgnetwork / elixir-omg

OMG-Network repository of Watcher and Watcher Info
https://omg.network
Apache License 2.0
213 stars 59 forks source link

Collect metrics through datadog for the perf project #1765

Closed ayrat555 closed 4 years ago

ayrat555 commented 4 years ago

This PR adds the following:

  1. If the value of the metric is above a threshold. I set thresholds based on average time during my testing
  2. If the test failed at least once during the current test run.

I created two monitors for both tests:

  1. Deposits test dashboard https://app.datadoghq.com/dashboard/rpx-xu2-b2g/deposits-perf-tests?from_ts=1605343939055&live=true&to_ts=1605430339055&tpl_var_env=perf_circleci
  2. Transaction test dashboard https://app.datadoghq.com/dashboard/7kh-xx4-9qu/transactions-perf-tests

Created monitors:

Notes:

InoMurko commented 4 years ago

Feedback:

The dasboards are great, but:

ayrat555 commented 4 years ago

@boolafish can you please review this pr

ayrat555 commented 4 years ago

@boolafish

one side note: I am not sure how much do we need to chain the tests now (I know it was previously brought up for really long running tests like for days). One note/idea after looking at the PR is that we can actually separate traffic trigger and result checking into 2 spinnaker stages. This would make it flexible on having multiple previous stages that triggers the traffic and the one single last stage that check the metrics

I added the ability to run tests and make assertions separately.

From docs:

  Running tests without assertions.
  You can run tests without assertions by passing `false` as the last parameter:

    STATIX_TAG="env:perf_circleci" mix run -e "LoadTest.TestRunner.run()" -- "transactions" 1 80 false

  To just check if there are any events in the given period of time run passing start time and end time:

  STATIX_TAG="env:perf_circleci" mix run -e "LoadTest.TestRunner.run()" -- "make_assertions" 1605775276 1605785276