diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-16 09:07:06 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-16 09:07:06 +0300 |
commit | 3546e1bb0971347e9e9984de0799e3fb53743b33 (patch) | |
tree | f65e47d5deb95905aa419ebd70ce02c7b32ddb8f /spec/lib/gitlab/metrics | |
parent | f155cc9034f2247c5d368f9b0212ad44248b0c5e (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/gitlab/metrics')
-rw-r--r-- | spec/lib/gitlab/metrics/transaction_spec.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/lib/gitlab/metrics/transaction_spec.rb b/spec/lib/gitlab/metrics/transaction_spec.rb index 45e74597a2e..08de2426c5a 100644 --- a/spec/lib/gitlab/metrics/transaction_spec.rb +++ b/spec/lib/gitlab/metrics/transaction_spec.rb @@ -27,6 +27,14 @@ describe Gitlab::Metrics::Transaction do end end + describe '#thread_cpu_duration' do + it 'returns the duration of a transaction in seconds' do + transaction.run { } + + expect(transaction.thread_cpu_duration).to be > 0 + end + end + describe '#allocated_memory' do it 'returns the allocated memory in bytes' do transaction.run { 'a' * 32 } |