vici: Don't report memory usage via leak-detective
This slowed down the `swanctl --stats` calls in the test scenarios significantly, with not much added value.
This commit is contained in:
committed by
Andreas Steffen
parent
ae37090e65
commit
74270c8c86
@@ -1020,18 +1020,6 @@ CALLBACK(version, vici_message_t*,
|
|||||||
return b->finalize(b);
|
return b->finalize(b);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Callback function for memusage summary
|
|
||||||
*/
|
|
||||||
CALLBACK(sum_usage, void,
|
|
||||||
vici_builder_t *b, int count, size_t bytes, int whitelisted)
|
|
||||||
{
|
|
||||||
b->begin_section(b, "mem");
|
|
||||||
b->add_kv(b, "total", "%zu", bytes);
|
|
||||||
b->add_kv(b, "allocs", "%d", count);
|
|
||||||
b->end_section(b);
|
|
||||||
}
|
|
||||||
|
|
||||||
CALLBACK(stats, vici_message_t*,
|
CALLBACK(stats, vici_message_t*,
|
||||||
private_vici_query_t *this, char *name, u_int id, vici_message_t *request)
|
private_vici_query_t *this, char *name, u_int id, vici_message_t *request)
|
||||||
{
|
{
|
||||||
@@ -1093,12 +1081,7 @@ CALLBACK(stats, vici_message_t*,
|
|||||||
enumerator->destroy(enumerator);
|
enumerator->destroy(enumerator);
|
||||||
b->end_list(b);
|
b->end_list(b);
|
||||||
|
|
||||||
if (lib->leak_detective)
|
|
||||||
{
|
|
||||||
lib->leak_detective->usage(lib->leak_detective, NULL, sum_usage, b);
|
|
||||||
}
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
else
|
|
||||||
{
|
{
|
||||||
DWORD lasterr = ERROR_INVALID_HANDLE;
|
DWORD lasterr = ERROR_INVALID_HANDLE;
|
||||||
HANDLE heaps[32];
|
HANDLE heaps[32];
|
||||||
|
|||||||
@@ -537,7 +537,6 @@ do
|
|||||||
> $TESTRESULTDIR/${host}.swanctl.$subsys 2>/dev/null
|
> $TESTRESULTDIR/${host}.swanctl.$subsys 2>/dev/null
|
||||||
done
|
done
|
||||||
|
|
||||||
# this is quite slow due to allocation stats via leak-detective
|
|
||||||
ssh $SSHCONF $HOSTLOGIN swanctl --stats \
|
ssh $SSHCONF $HOSTLOGIN swanctl --stats \
|
||||||
> $TESTRESULTDIR/${host}.swanctl.stats 2>/dev/null
|
> $TESTRESULTDIR/${host}.swanctl.stats 2>/dev/null
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user