| 123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- // Copyright (c) 2014-2015, THUNDERBEAST GAMES LLC All rights reserved
- // Please see LICENSE.md in repository root for license information
- // https://github.com/AtomicGameEngine/AtomicGameEngine
- #pragma once
- #include <Atomic/Core/Context.h>
- #include <Atomic/Core/Object.h>
- #include <Atomic/Container/List.h>
- namespace Atomic
- {
- class JSVM;
- class JSMetrics : public Object
- {
- OBJECT(JSMetrics);
- struct ObjectMetric
- {
- String classname;
- int count;
- };
- public:
- /// Construct.
- JSMetrics(Context* context, JSVM* vm);
- /// Destruct.
- virtual ~JSMetrics();
- void Capture();
- void Dump();
- private:
- WeakPtr<JSVM> vm_;
- // Object
- HashMap<StringHash, ObjectMetric> objectMetrics_;
- };
- }
|