"Fossies" - the Fresh Open Source Software Archive

Member "sysdig-0.26.1/userspace/libsinsp/internal_metrics.cpp" (24 May 2019, 942 Bytes) of package /linux/misc/sysdig-0.26.1.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "internal_metrics.cpp" see the Fossies "Dox" file reference documentation.

    1 /*
    2 Copyright (C) 2013-2018 Draios Inc dba Sysdig.
    3 
    4 This file is part of sysdig.
    5 
    6 Licensed under the Apache License, Version 2.0 (the "License");
    7 you may not use this file except in compliance with the License.
    8 You may obtain a copy of the License at
    9 
   10     http://www.apache.org/licenses/LICENSE-2.0
   11 
   12 Unless required by applicable law or agreed to in writing, software
   13 distributed under the License is distributed on an "AS IS" BASIS,
   14 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   15 See the License for the specific language governing permissions and
   16 limitations under the License.
   17 
   18 */
   19 
   20 #include "sinsp.h"
   21 #include "sinsp_int.h"
   22 
   23 #ifdef GATHER_INTERNAL_STATS
   24 namespace internal_metrics
   25 {
   26 
   27 counter::~counter()
   28 {
   29 }
   30 
   31 counter::counter()
   32 {
   33     m_value = 0;
   34 }
   35 
   36 void registry::clear_all_metrics()
   37 {
   38     for(metric_map_iterator_t it = get_metrics().begin(); it != get_metrics().end(); it++)
   39     {
   40         it->second->clear();
   41     }
   42 
   43 }
   44 
   45 }
   46 #endif