Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
H
holi-load-testing
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Operate
Terraform modules
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
app
holi-load-testing
Commits
c55ef075
Commit
c55ef075
authored
1 year ago
by
Malte Finsterwalder
Browse files
Options
Downloads
Patches
Plain Diff
log reported errors
parent
c5e082a5
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
google-cloud-monitoring-reporter/delete-metric.js
+18
-0
18 additions, 0 deletions
google-cloud-monitoring-reporter/delete-metric.js
google-cloud-monitoring-reporter/main.js
+1
-0
1 addition, 0 deletions
google-cloud-monitoring-reporter/main.js
with
19 additions
and
0 deletions
google-cloud-monitoring-reporter/delete-metric.js
0 → 100644
+
18
−
0
View file @
c55ef075
import
{
MetricServiceClient
}
from
'
@google-cloud/monitoring
'
const
client
=
new
MetricServiceClient
()
const
projectId
=
'
holi-shared
'
const
metricTypePrefix
=
'
custom.googleapis.com/performance/graphql
'
async
function
deleteMetricDescriptor
(
name
)
{
const
request
=
{
name
:
client
.
projectMetricDescriptorPath
(
projectId
,
`
${
metricTypePrefix
}
/
${
name
}
`
),
}
// Deletes a metric descriptor
const
[
result
]
=
await
client
.
deleteMetricDescriptor
(
request
)
console
.
log
(
`Deleted
${
`
${
metricTypePrefix
}
/
${
name
}
`
}
`
,
result
)
}
deleteMetricDescriptor
(
'
XYZ
'
)
This diff is collapsed.
Click to expand it.
google-cloud-monitoring-reporter/main.js
+
1
−
0
View file @
c55ef075
...
...
@@ -22,6 +22,7 @@ process.argv.slice(2).forEach((arg, index, array) => {
if
(
result
[
'
errors
'
])
{
await
createErrorMetric
()
await
sendMetric
(
timestamp
,
'
errors
'
,
`
${
test
}
`
,
{
int64Value
:
result
[
'
errors
'
]
})
console
.
info
(
`reported
${
result
[
'
errors
'
]}
errors for
${
test
}
and time
${
timestamp
}
`
)
}
}
})
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment