#include "remote_gperf_impl.h"
#include <gperftools/heap-profiler.h>
#include <gperftools/malloc_extension.h>
#include <gperftools/profiler.h>

namespace sled {
RemoteGPerfImpl::RemoteGPerfImpl(int port) {}

RemoteGPerfImpl::~RemoteGPerfImpl() {}

std::string
RemoteGPerfImpl::HeapGET()
{
    MallocExtensionWriter writer;
    MallocExtension::instance()->GetHeapSample(&writer);
    return writer;
}

std::string
RemoteGPerfImpl::GrowthGET()
{
    MallocExtensionWriter writer;
    MallocExtension::instance()->GetHeapGrowthStacks(&writer);
    return writer;
}

std::string
RemoteGPerfImpl::CmdLineGET()
{
    return "";
}
}// namespace sled
