...

Source file src/scheduler/metrics/records.go

Documentation: scheduler/metrics

     1  /*
     2   * P2PFaaS - A framework for FaaS Load Balancing
     3   * Copyright (c) 2019 - 2022. Gabriele Proietti Mattia <pm.gabriele@outlook.com>
     4   *
     5   * This program is free software: you can redistribute it and/or modify
     6   * it under the terms of the GNU General Public License as published by
     7   * the Free Software Foundation, either version 3 of the License, or
     8   * (at your option) any later version.
     9   *
    10   * This program is distributed in the hope that it will be useful,
    11   * but WITHOUT ANY WARRANTY; without even the implied warranty of
    12   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13   * GNU General Public License for more details.
    14   *
    15   * You should have received a copy of the GNU General Public License
    16   * along with this program.  If not, see <https://www.gnu.org/licenses/>.
    17   */
    18  
    19  package metrics
    20  
    21  /*
    22  var (
    23  	jobHops = promauto.NewSummaryVec(prometheus.SummaryOpts{
    24  		Name: "scheduler_job_hops",
    25  		Help: "Number of hops per job.",
    26  	}, []string{"function_name", "code"})
    27  
    28  	jobExecutionTime = promauto.NewSummaryVec(prometheus.SummaryOpts{
    29  		Name: "scheduler_job_execution_time",
    30  		Help: "Time for executing the job in the machine that actually executes it",
    31  	}, []string{"function_name", "code"})
    32  
    33  	jobQueueTime = promauto.NewSummaryVec(prometheus.SummaryOpts{
    34  		Name: "scheduler_job_queue_time",
    35  		Help: "Total time for the job to stay in the queue before being executed",
    36  	}, []string{"function_name", "code"})
    37  
    38  	jobForwardingTime = promauto.NewSummaryVec(prometheus.SummaryOpts{
    39  		Name: "scheduler_job_forwarding_time",
    40  		Help: "Total time for the job to wait for being executed externally",
    41  	}, []string{"function_name", "code"})
    42  
    43  	jobFaasExecutionTime = promauto.NewSummaryVec(prometheus.SummaryOpts{
    44  		Name: "scheduler_job_faas_execution_time",
    45  		Help: "Total time for the job for being executed by openfaas",
    46  	}, []string{"function_name", "code"})
    47  
    48  	jobForwardedCount = promauto.NewCounterVec(prometheus.CounterOpts{
    49  		Name: "scheduler_job_forwarded_count",
    50  		Help: "Total time for the job for being executed by openfaas",
    51  	}, []string{"function_name"})
    52  
    53  	invocationsTotal = promauto.NewCounterVec(prometheus.CounterOpts{
    54  		Name: "scheduler_total_invocations",
    55  		Help: "The total number of requests for executing a function",
    56  	}, []string{"function_name", "code"})
    57  
    58  	queueFill = promauto.NewGauge(prometheus.GaugeOpts{
    59  		Name: "scheduler_queue_fill",
    60  		Help: "The number of jobs in the queue",
    61  	})
    62  
    63  	queueFree = promauto.NewGauge(prometheus.GaugeOpts{
    64  		Name: "scheduler_queue_free",
    65  		Help: "The number of free slots in the queue",
    66  	})
    67  
    68  	currentRunningJobs = promauto.NewGauge(prometheus.GaugeOpts{
    69  		Name: "scheduler_current_running_jobs",
    70  		Help: "The number of currently running jobs, not forwarded but executed locally even from remote",
    71  	})
    72  
    73  	currentFreeRunningJobs = promauto.NewGauge(prometheus.GaugeOpts{
    74  		Name: "scheduler_current_free_running_jobs",
    75  		Help: "The number of free slots for running jobs, not forwarded but executed locally even from remote",
    76  	})
    77  )
    78  */
    79  

View as plain text