All Downloads are FREE. Search and download functionalities are using the official Maven repository.

z3-z3-4.13.0.src.util.statistics.h Maven / Gradle / Ivy

The newest version!
/*++
Copyright (c) 2011 Microsoft Corporation

Module Name:

    statistics.h

Abstract:

    Wrapper for reporting statistics

Author:

    Leonardo (leonardo) 2011-05-17

Notes:

--*/
#pragma once

#include
#include "util/vector.h"
#include "util/rlimit.h"

class statistics {
    typedef std::pair key_val_pair;
    svector   m_stats;
    typedef std::pair key_d_val_pair;
    svector m_d_stats;
public:
    void copy(statistics const & st);
    void reset();
    void update(char const * key, unsigned inc);
    void update(char const * key, double inc);
    std::ostream& display(std::ostream & out) const;
    std::ostream& display_smt2(std::ostream & out) const;
    void display_internal(std::ostream & out) const;
    unsigned size() const;
    bool is_uint(unsigned idx) const;
    char const * get_key(unsigned idx) const;
    unsigned get_uint_value(unsigned idx) const;
    double get_double_value(unsigned idx) const;
};

inline std::ostream& operator<<(std::ostream& out, statistics const& st) { return st.display(out); }

void get_memory_statistics(statistics& st);
void get_rlimit_statistics(reslimit& l, statistics& st);





© 2015 - 2024 Weber Informatics LLC | Privacy Policy