Sha256: f630057a8ee875a22601a35c96ef9c565bdb77f31212a6bd58a4ec4a63020359

Contents?: true

Size: 1.25 KB

Versions: 20

Compression:

Stored size: 1.25 KB

Contents

/*
 * A statistics collector library.
 *
 * Copyright (C) 2008-2013 NEC Corporation
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License, version 2, as
 * published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License along
 * with this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 */


#ifndef STAT_H
#define STAT_H


#define STAT_KEY_LENGTH 256


typedef struct {
  char key[ STAT_KEY_LENGTH ];
  uint64_t value;
} stat_entry;


bool init_stat( void );
bool finalize_stat( void );
bool add_stat_entry( const char *key );
void increment_stat( const char *key );
void reset_stats( void );
void foreach_stat( void function( const char *key, const uint64_t value, void *user_data ), void *user_data );
void dump_stats();


#endif // STAT_H


/*
 * Local variables:
 * c-basic-offset: 2
 * indent-tabs-mode: nil
 * End:
 */

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
trema-0.4.7 src/lib/stat.h
trema-0.4.6 src/lib/stat.h
trema-0.4.5 src/lib/stat.h
trema-0.4.4 src/lib/stat.h
trema-0.4.3 src/lib/stat.h
trema-0.4.2 src/lib/stat.h
trema-0.4.1 src/lib/stat.h
trema-0.4.0 src/lib/stat.h
trema-0.3.21 src/lib/stat.h
trema-0.3.20 src/lib/stat.h
trema-0.3.19 src/lib/stat.h
trema-0.3.18 src/lib/stat.h
trema-0.3.17 src/lib/stat.h
trema-0.3.16 src/lib/stat.h
trema-0.3.15 src/lib/stat.h
trema-0.3.14 src/lib/stat.h
trema-0.3.13 src/lib/stat.h
trema-0.3.12 src/lib/stat.h
trema-0.3.11 src/lib/stat.h
trema-0.3.10 src/lib/stat.h