mirror of
https://github.com/NixOS/nix.git
synced 2024-11-26 00:32:28 +00:00
libexpr: Add nrExprs to NIX_SHOW_STATS
This commit is contained in:
parent
4a8c9bb9aa
commit
3720e811fa
@ -2506,6 +2506,7 @@ void EvalState::printStats()
|
|||||||
{"elements", nrValuesInEnvs},
|
{"elements", nrValuesInEnvs},
|
||||||
{"bytes", bEnvs},
|
{"bytes", bEnvs},
|
||||||
};
|
};
|
||||||
|
topObj["nrExprs"] = Expr::nrExprs;
|
||||||
topObj["list"] = {
|
topObj["list"] = {
|
||||||
{"elements", nrListElems},
|
{"elements", nrListElems},
|
||||||
{"bytes", bLists},
|
{"bytes", bLists},
|
||||||
|
@ -155,6 +155,10 @@ std::string showAttrPath(const SymbolTable & symbols, const AttrPath & attrPath)
|
|||||||
|
|
||||||
struct Expr
|
struct Expr
|
||||||
{
|
{
|
||||||
|
static unsigned long nrExprs;
|
||||||
|
inline Expr() {
|
||||||
|
nrExprs++;
|
||||||
|
}
|
||||||
virtual ~Expr() { };
|
virtual ~Expr() { };
|
||||||
virtual void show(const SymbolTable & symbols, std::ostream & str) const;
|
virtual void show(const SymbolTable & symbols, std::ostream & str) const;
|
||||||
virtual void bindVars(EvalState & es, const std::shared_ptr<const StaticEnv> & env);
|
virtual void bindVars(EvalState & es, const std::shared_ptr<const StaticEnv> & env);
|
||||||
|
@ -653,6 +653,7 @@ formal
|
|||||||
|
|
||||||
namespace nix {
|
namespace nix {
|
||||||
|
|
||||||
|
unsigned long Expr::nrExprs = 0;
|
||||||
|
|
||||||
Expr * EvalState::parse(
|
Expr * EvalState::parse(
|
||||||
char * text,
|
char * text,
|
||||||
|
Loading…
Reference in New Issue
Block a user