mirror of
https://github.com/serverless/serverless.git
synced 2026-01-18 14:58:43 +00:00
39 lines
903 B
JavaScript
39 lines
903 B
JavaScript
'use strict';
|
|
|
|
class Metrics {
|
|
constructor(serverless, options) {
|
|
this.serverless = serverless;
|
|
this.options = options;
|
|
|
|
this.commands = {
|
|
metrics: {
|
|
usage: 'Show metrics for a specific function',
|
|
configDependent: true,
|
|
lifecycleEvents: ['metrics'],
|
|
options: {
|
|
function: {
|
|
usage: 'The function name',
|
|
shortcut: 'f',
|
|
},
|
|
stage: {
|
|
usage: 'Stage of the service',
|
|
shortcut: 's',
|
|
},
|
|
region: {
|
|
usage: 'Region of the service',
|
|
shortcut: 'r',
|
|
},
|
|
startTime: {
|
|
usage: 'Start time for the metrics retrieval (e.g. 1970-01-01)',
|
|
},
|
|
endTime: {
|
|
usage: 'End time for the metrics retrieval (e.g. 1970-01-01)',
|
|
},
|
|
},
|
|
},
|
|
};
|
|
}
|
|
}
|
|
|
|
module.exports = Metrics;
|