Compare commits
8 Commits
v0.0.9
...
79410d071f
Author | SHA1 | Date | |
---|---|---|---|
79410d071f | |||
1fcca6450d | |||
55271ad06c | |||
e675612599 | |||
42b5d50492 | |||
6394995def | |||
c649bc7964 | |||
ec85a06d01 |
@@ -1,7 +1,7 @@
|
||||
cmake_minimum_required(VERSION 3.18)
|
||||
project(
|
||||
conflict-set
|
||||
VERSION 0.0.9
|
||||
VERSION 0.0.10
|
||||
DESCRIPTION
|
||||
"A data structure for optimistic concurrency control on ranges of bitwise-lexicographically-ordered keys."
|
||||
HOMEPAGE_URL "https://git.weaselab.dev/weaselab/conflict-set"
|
||||
|
@@ -729,6 +729,8 @@ struct WriteContext {
|
||||
double entries_inserted_accum = 0;
|
||||
double nodes_allocated_accum = 0;
|
||||
double nodes_released_accum = 0;
|
||||
double point_writes_accum = 0;
|
||||
double range_writes_accum = 0;
|
||||
template <class T> T *allocate(int c) {
|
||||
++nodes_allocated_accum;
|
||||
if constexpr (std::is_same_v<T, Node0>) {
|
||||
@@ -2949,6 +2951,7 @@ void destroyTree(Node *root) {
|
||||
void addPointWrite(Node *&root, std::span<const uint8_t> key,
|
||||
InternalVersionT writeVersion, WriteContext *tls,
|
||||
ConflictSet::Impl *impl) {
|
||||
++tls->point_writes_accum;
|
||||
auto *n = insert<true>(&root, key, writeVersion, tls, impl);
|
||||
if (!n->entryPresent) {
|
||||
++tls->entries_inserted_accum;
|
||||
@@ -2978,6 +2981,7 @@ void addWriteRange(Node *&root, std::span<const uint8_t> begin,
|
||||
end.back() == 0) {
|
||||
return addPointWrite(root, begin, writeVersion, tls, impl);
|
||||
}
|
||||
++tls->range_writes_accum;
|
||||
const bool beginIsPrefix = lcp == int(begin.size());
|
||||
auto remaining = begin.subspan(0, lcp);
|
||||
|
||||
@@ -3200,8 +3204,6 @@ struct __attribute__((visibility("hidden"))) ConflictSet::Impl {
|
||||
}
|
||||
|
||||
double write_byte_accum = 0;
|
||||
int point_writes_accum = 0;
|
||||
int range_writes_accum = 0;
|
||||
for (int i = 0; i < count; ++i) {
|
||||
const auto &w = writes[i];
|
||||
write_byte_accum += w.begin.len + w.end.len;
|
||||
@@ -3209,19 +3211,17 @@ struct __attribute__((visibility("hidden"))) ConflictSet::Impl {
|
||||
auto end = std::span<const uint8_t>(w.end.p, w.end.len);
|
||||
if (w.end.len > 0) {
|
||||
keyUpdates += 3;
|
||||
++range_writes_accum;
|
||||
addWriteRange(root, begin, end, InternalVersionT(writeVersion), &tls,
|
||||
this);
|
||||
} else {
|
||||
keyUpdates += 2;
|
||||
++point_writes_accum;
|
||||
addPointWrite(root, begin, InternalVersionT(writeVersion), &tls, this);
|
||||
}
|
||||
}
|
||||
|
||||
memory_bytes.set(totalBytes);
|
||||
point_writes_total.add(point_writes_accum);
|
||||
range_writes_total.add(range_writes_accum);
|
||||
point_writes_total.add(std::exchange(tls.point_writes_accum, 0));
|
||||
range_writes_total.add(std::exchange(tls.range_writes_accum, 0));
|
||||
nodes_allocated_total.add(std::exchange(tls.nodes_allocated_accum, 0));
|
||||
nodes_released_total.add(std::exchange(tls.nodes_released_accum, 0));
|
||||
entries_inserted_total.add(std::exchange(tls.entries_inserted_accum, 0));
|
||||
@@ -3928,7 +3928,7 @@ checkMaxVersion(Node *root, Node *node, InternalVersionT oldestVersion,
|
||||
bool &success, ConflictSet::Impl *impl) {
|
||||
checkVersionsGeqOldestExtant(node,
|
||||
InternalVersionT(impl->oldestExtantVersion));
|
||||
auto expected = InternalVersionT::zero;
|
||||
auto expected = oldestVersion;
|
||||
if (node->entryPresent) {
|
||||
expected = std::max(expected, node->entry.pointVersion);
|
||||
}
|
||||
@@ -4151,26 +4151,42 @@ int main(void) { printTree(); }
|
||||
|
||||
#ifdef ENABLE_FUZZ
|
||||
extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
|
||||
TestDriver<ConflictSet::Impl> driver{data, size};
|
||||
Arbitrary arbitrary({data, size});
|
||||
TestDriver<ConflictSet::Impl> driver1{arbitrary};
|
||||
TestDriver<ConflictSet::Impl> driver2{arbitrary};
|
||||
|
||||
bool done1 = false;
|
||||
bool done2 = false;
|
||||
for (;;) {
|
||||
bool done = driver.next();
|
||||
if (!driver.ok) {
|
||||
debugPrintDot(stdout, driver.cs.root, &driver.cs);
|
||||
fflush(stdout);
|
||||
abort();
|
||||
if (!done1) {
|
||||
done1 = driver1.next();
|
||||
if (!driver1.ok) {
|
||||
debugPrintDot(stdout, driver1.cs.root, &driver1.cs);
|
||||
fflush(stdout);
|
||||
abort();
|
||||
}
|
||||
if (!checkCorrectness(driver1.cs.root, driver1.cs.oldestVersion,
|
||||
&driver1.cs)) {
|
||||
debugPrintDot(stdout, driver1.cs.root, &driver1.cs);
|
||||
fflush(stdout);
|
||||
abort();
|
||||
}
|
||||
}
|
||||
#if DEBUG_VERBOSE && !defined(NDEBUG)
|
||||
fprintf(stderr, "Check correctness\n");
|
||||
#endif
|
||||
bool success =
|
||||
checkCorrectness(driver.cs.root, driver.cs.oldestVersion, &driver.cs);
|
||||
if (!success) {
|
||||
debugPrintDot(stdout, driver.cs.root, &driver.cs);
|
||||
fflush(stdout);
|
||||
abort();
|
||||
if (!done2) {
|
||||
done2 = driver2.next();
|
||||
if (!driver2.ok) {
|
||||
debugPrintDot(stdout, driver2.cs.root, &driver2.cs);
|
||||
fflush(stdout);
|
||||
abort();
|
||||
}
|
||||
if (!checkCorrectness(driver2.cs.root, driver2.cs.oldestVersion,
|
||||
&driver2.cs)) {
|
||||
debugPrintDot(stdout, driver2.cs.root, &driver2.cs);
|
||||
fflush(stdout);
|
||||
abort();
|
||||
}
|
||||
}
|
||||
if (done) {
|
||||
if (done1 && done2) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
126
Internal.h
126
Internal.h
@@ -580,11 +580,14 @@ namespace {
|
||||
|
||||
template <class ConflictSetImpl, bool kEnableAssertions = true>
|
||||
struct TestDriver {
|
||||
Arbitrary arbitrary;
|
||||
explicit TestDriver(const uint8_t *data, size_t size)
|
||||
: arbitrary({data, size}) {}
|
||||
Arbitrary *arbitrary;
|
||||
explicit TestDriver(Arbitrary &a) : arbitrary(&a) {
|
||||
#if DEBUG_VERBOSE && !defined(NDEBUG)
|
||||
fprintf(stderr, "%p Initial version: {%" PRId64 "}\n", this, writeVersion);
|
||||
#endif
|
||||
}
|
||||
|
||||
int64_t oldestVersion = arbitrary.next();
|
||||
int64_t oldestVersion = arbitrary->next();
|
||||
int64_t writeVersion = oldestVersion;
|
||||
ConflictSetImpl cs{oldestVersion};
|
||||
ReferenceImpl refImpl{oldestVersion};
|
||||
@@ -593,33 +596,34 @@ struct TestDriver {
|
||||
|
||||
bool ok = true;
|
||||
|
||||
const int prefixLen = arbitrary.bounded(512);
|
||||
const int prefixByte = arbitrary.randT<uint8_t>();
|
||||
const int prefixLen = arbitrary->bounded(512);
|
||||
const int prefixByte = arbitrary->randT<uint8_t>();
|
||||
|
||||
// Call until it returns true, for "done". Check internal invariants etc
|
||||
// between calls to next.
|
||||
bool next() {
|
||||
assert(cs.getBytes() >= 0);
|
||||
if (!arbitrary.hasEntropy()) {
|
||||
if (!arbitrary->hasEntropy()) {
|
||||
return true;
|
||||
}
|
||||
Arena arena;
|
||||
{
|
||||
int numPointWrites = arbitrary.bounded(100);
|
||||
int numRangeWrites = arbitrary.bounded(100);
|
||||
int64_t v = (writeVersion += arbitrary.bounded(10) ? arbitrary.bounded(10)
|
||||
: arbitrary.next());
|
||||
int numPointWrites = arbitrary->bounded(100);
|
||||
int numRangeWrites = arbitrary->bounded(100);
|
||||
int64_t v =
|
||||
(writeVersion +=
|
||||
arbitrary->bounded(10) ? arbitrary->bounded(10) : arbitrary->next());
|
||||
auto *writes =
|
||||
new (arena) ConflictSet::WriteRange[numPointWrites + numRangeWrites];
|
||||
auto keys = set<std::string_view>(arena);
|
||||
while (int(keys.size()) < numPointWrites + numRangeWrites * 2) {
|
||||
if (!arbitrary.hasEntropy()) {
|
||||
if (!arbitrary->hasEntropy()) {
|
||||
return true;
|
||||
}
|
||||
int keyLen = prefixLen + arbitrary.bounded(kMaxKeySuffixLen);
|
||||
int keyLen = prefixLen + arbitrary->bounded(kMaxKeySuffixLen);
|
||||
auto *begin = new (arena) uint8_t[keyLen];
|
||||
memset(begin, prefixByte, prefixLen);
|
||||
arbitrary.randomBytes(begin + prefixLen, keyLen - prefixLen);
|
||||
arbitrary->randomBytes(begin + prefixLen, keyLen - prefixLen);
|
||||
keys.insert(std::string_view((const char *)begin, keyLen));
|
||||
}
|
||||
|
||||
@@ -629,7 +633,7 @@ struct TestDriver {
|
||||
rangesRemaining = numRangeWrites;
|
||||
pointsRemaining > 0 || rangesRemaining > 0; ++i) {
|
||||
bool pointRead = pointsRemaining > 0 && rangesRemaining > 0
|
||||
? bool(arbitrary.bounded(2))
|
||||
? bool(arbitrary->bounded(2))
|
||||
: pointsRemaining > 0;
|
||||
if (pointRead) {
|
||||
assert(pointsRemaining > 0);
|
||||
@@ -648,33 +652,20 @@ struct TestDriver {
|
||||
++iter;
|
||||
--rangesRemaining;
|
||||
}
|
||||
#if DEBUG_VERBOSE && !defined(NDEBUG)
|
||||
if (writes[i].end.len == 0) {
|
||||
fprintf(stderr, "Write: {%s}\n", printable(writes[i].begin).c_str());
|
||||
} else {
|
||||
fprintf(stderr, "Write: [%s, %s)\n",
|
||||
printable(writes[i].begin).c_str(),
|
||||
printable(writes[i].end).c_str());
|
||||
}
|
||||
#endif
|
||||
}
|
||||
assert(iter == keys.end());
|
||||
assert(i == numPointWrites + numRangeWrites);
|
||||
|
||||
#if DEBUG_VERBOSE && !defined(NDEBUG)
|
||||
fprintf(stderr, "Write @ %" PRId64 "\n", v);
|
||||
#endif
|
||||
|
||||
// Test non-canonical writes
|
||||
if (numPointWrites > 0) {
|
||||
int overlaps = arbitrary.bounded(numPointWrites);
|
||||
int overlaps = arbitrary->bounded(numPointWrites);
|
||||
for (int i = 0; i < numPointWrites + numRangeWrites && overlaps > 0;
|
||||
++i) {
|
||||
if (writes[i].end.len == 0) {
|
||||
int keyLen = prefixLen + arbitrary.bounded(kMaxKeySuffixLen);
|
||||
int keyLen = prefixLen + arbitrary->bounded(kMaxKeySuffixLen);
|
||||
auto *begin = new (arena) uint8_t[keyLen];
|
||||
memset(begin, prefixByte, prefixLen);
|
||||
arbitrary.randomBytes(begin + prefixLen, keyLen - prefixLen);
|
||||
arbitrary->randomBytes(begin + prefixLen, keyLen - prefixLen);
|
||||
writes[i].end.len = keyLen;
|
||||
writes[i].end.p = begin;
|
||||
auto c =
|
||||
@@ -692,10 +683,10 @@ struct TestDriver {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (arbitrary.bounded(2)) {
|
||||
if (arbitrary->bounded(2)) {
|
||||
// Shuffle writes
|
||||
for (int i = numPointWrites + numRangeWrites - 1; i > 0; --i) {
|
||||
int j = arbitrary.bounded(i + 1);
|
||||
int j = arbitrary->bounded(i + 1);
|
||||
if (i != j) {
|
||||
using std::swap;
|
||||
swap(writes[i], writes[j]);
|
||||
@@ -704,7 +695,7 @@ struct TestDriver {
|
||||
}
|
||||
|
||||
oldestVersion +=
|
||||
arbitrary.bounded(10) ? arbitrary.bounded(10) : arbitrary.next();
|
||||
arbitrary->bounded(10) ? arbitrary->bounded(10) : arbitrary->next();
|
||||
oldestVersion = std::min(oldestVersion, writeVersion);
|
||||
|
||||
#ifdef THREAD_TEST
|
||||
@@ -721,6 +712,20 @@ struct TestDriver {
|
||||
ready.wait();
|
||||
#endif
|
||||
|
||||
#if DEBUG_VERBOSE && !defined(NDEBUG)
|
||||
for (int i = 0; i < numPointWrites + numRangeWrites; ++i) {
|
||||
if (writes[i].end.len == 0) {
|
||||
fprintf(stderr, "%p Write: {%s}\n", this,
|
||||
printable(writes[i].begin).c_str());
|
||||
} else {
|
||||
fprintf(stderr, "%p Write: [%s, %s)\n", this,
|
||||
printable(writes[i].begin).c_str(),
|
||||
printable(writes[i].end).c_str());
|
||||
}
|
||||
}
|
||||
fprintf(stderr, "%p Write @ %" PRId64 "\n", this, v);
|
||||
#endif
|
||||
|
||||
CALLGRIND_START_INSTRUMENTATION;
|
||||
cs.addWrites(writes, numPointWrites + numRangeWrites, v);
|
||||
CALLGRIND_STOP_INSTRUMENTATION;
|
||||
@@ -729,6 +734,10 @@ struct TestDriver {
|
||||
refImpl.addWrites(writes, numPointWrites + numRangeWrites, v);
|
||||
}
|
||||
|
||||
#if DEBUG_VERBOSE && !defined(NDEBUG)
|
||||
fprintf(stderr, "%p Set oldest version: %" PRId64 "\n", this,
|
||||
oldestVersion);
|
||||
#endif
|
||||
cs.setOldestVersion(oldestVersion);
|
||||
if constexpr (kEnableAssertions) {
|
||||
refImpl.setOldestVersion(oldestVersion);
|
||||
@@ -739,24 +748,24 @@ struct TestDriver {
|
||||
#endif
|
||||
}
|
||||
{
|
||||
int numPointReads = arbitrary.bounded(100);
|
||||
int numRangeReads = arbitrary.bounded(100);
|
||||
int numPointReads = arbitrary->bounded(100);
|
||||
int numRangeReads = arbitrary->bounded(100);
|
||||
|
||||
int64_t v = std::max<int64_t>(writeVersion - (arbitrary.bounded(10)
|
||||
? arbitrary.bounded(10)
|
||||
: arbitrary.next()),
|
||||
int64_t v = std::max<int64_t>(writeVersion - (arbitrary->bounded(10)
|
||||
? arbitrary->bounded(10)
|
||||
: arbitrary->next()),
|
||||
0);
|
||||
auto *reads =
|
||||
new (arena) ConflictSet::ReadRange[numPointReads + numRangeReads];
|
||||
auto keys = set<std::string_view>(arena);
|
||||
while (int(keys.size()) < numPointReads + numRangeReads * 2) {
|
||||
if (!arbitrary.hasEntropy()) {
|
||||
if (!arbitrary->hasEntropy()) {
|
||||
return true;
|
||||
}
|
||||
int keyLen = prefixLen + arbitrary.bounded(kMaxKeySuffixLen);
|
||||
int keyLen = prefixLen + arbitrary->bounded(kMaxKeySuffixLen);
|
||||
auto *begin = new (arena) uint8_t[keyLen];
|
||||
memset(begin, prefixByte, prefixLen);
|
||||
arbitrary.randomBytes(begin + prefixLen, keyLen - prefixLen);
|
||||
arbitrary->randomBytes(begin + prefixLen, keyLen - prefixLen);
|
||||
keys.insert(std::string_view((const char *)begin, keyLen));
|
||||
}
|
||||
|
||||
@@ -765,7 +774,7 @@ struct TestDriver {
|
||||
for (int pointsRemaining = numPointReads, rangesRemaining = numRangeReads;
|
||||
pointsRemaining > 0 || rangesRemaining > 0; ++i) {
|
||||
bool pointRead = pointsRemaining > 0 && rangesRemaining > 0
|
||||
? bool(arbitrary.bounded(2))
|
||||
? bool(arbitrary->bounded(2))
|
||||
: pointsRemaining > 0;
|
||||
if (pointRead) {
|
||||
assert(pointsRemaining > 0);
|
||||
@@ -787,10 +796,10 @@ struct TestDriver {
|
||||
reads[i].readVersion = v;
|
||||
#if DEBUG_VERBOSE && !defined(NDEBUG)
|
||||
if (reads[i].end.len == 0) {
|
||||
fprintf(stderr, "Read: {%s} @ %" PRId64 "\n",
|
||||
fprintf(stderr, "%p Read: {%s} @ %" PRId64 "\n", this,
|
||||
printable(reads[i].begin).c_str(), reads[i].readVersion);
|
||||
} else {
|
||||
fprintf(stderr, "Read: [%s, %s) @ %" PRId64 "\n",
|
||||
fprintf(stderr, "%p Read: [%s, %s) @ %" PRId64 "\n", this,
|
||||
printable(reads[i].begin).c_str(),
|
||||
printable(reads[i].end).c_str(), reads[i].readVersion);
|
||||
}
|
||||
@@ -839,24 +848,27 @@ struct TestDriver {
|
||||
refImpl.check(reads, results2, numPointReads + numRangeReads);
|
||||
}
|
||||
|
||||
auto compareResults = [reads](ConflictSet::Result *results1,
|
||||
ConflictSet::Result *results2, int count) {
|
||||
auto compareResults = [reads, this](ConflictSet::Result *results1,
|
||||
ConflictSet::Result *results2,
|
||||
int count) {
|
||||
for (int i = 0; i < count; ++i) {
|
||||
if (results1[i] != results2[i]) {
|
||||
if (reads[i].end.len == 0) {
|
||||
fprintf(stderr,
|
||||
"Expected %s, got %s for read of {%s} at version %" PRId64
|
||||
"\n",
|
||||
resultToStr(results2[i]), resultToStr(results1[i]),
|
||||
printable(reads[i].begin).c_str(), reads[i].readVersion);
|
||||
} else {
|
||||
fprintf(
|
||||
stderr,
|
||||
"Expected %s, got %s for read of [%s, %s) at version %" PRId64
|
||||
"%p Expected %s, got %s for read of {%s} at version %" PRId64
|
||||
"\n",
|
||||
resultToStr(results2[i]), resultToStr(results1[i]),
|
||||
printable(reads[i].begin).c_str(),
|
||||
printable(reads[i].end).c_str(), reads[i].readVersion);
|
||||
(void *)this, resultToStr(results2[i]),
|
||||
resultToStr(results1[i]), printable(reads[i].begin).c_str(),
|
||||
reads[i].readVersion);
|
||||
} else {
|
||||
fprintf(stderr,
|
||||
"%p Expected %s, got %s for read of [%s, %s) at version "
|
||||
"%" PRId64 "\n",
|
||||
(void *)this, resultToStr(results2[i]),
|
||||
resultToStr(results1[i]),
|
||||
printable(reads[i].begin).c_str(),
|
||||
printable(reads[i].end).c_str(), reads[i].readVersion);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
@@ -778,10 +778,6 @@ struct __attribute__((visibility("hidden"))) ConflictSet::Impl {
|
||||
for (int s = stripes - 1; s >= 0; s--) {
|
||||
for (int i = 0; i * 2 < ss; ++i) {
|
||||
const auto &w = combinedWriteConflictRanges[s * stripeSize / 2 + i];
|
||||
#if DEBUG_VERBOSE
|
||||
printf("Write begin: %s\n", printable(w.begin).c_str());
|
||||
fflush(stdout);
|
||||
#endif
|
||||
values[i * 2] = w.first;
|
||||
values[i * 2 + 1] = w.second;
|
||||
keyUpdates += 3;
|
||||
|
@@ -13,25 +13,58 @@ int main(int argc, char **argv) {
|
||||
std::stringstream buffer;
|
||||
buffer << t.rdbuf();
|
||||
auto str = buffer.str();
|
||||
TestDriver<ConflictSet, !PERF_TEST> driver{(const uint8_t *)str.data(),
|
||||
str.size()};
|
||||
while (!driver.next())
|
||||
;
|
||||
if (!driver.ok) {
|
||||
abort();
|
||||
Arbitrary arbitrary({(const uint8_t *)str.data(), str.size()});
|
||||
TestDriver<ConflictSet, !PERF_TEST> driver1{arbitrary};
|
||||
TestDriver<ConflictSet, !PERF_TEST> driver2{arbitrary};
|
||||
bool done1 = false;
|
||||
bool done2 = false;
|
||||
for (;;) {
|
||||
if (!done1) {
|
||||
done1 = driver1.next();
|
||||
if (!driver1.ok) {
|
||||
abort();
|
||||
}
|
||||
}
|
||||
if (!done2) {
|
||||
done2 = driver2.next();
|
||||
if (!driver2.ok) {
|
||||
abort();
|
||||
}
|
||||
}
|
||||
if (done1 && done2) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
ConflictSet::MetricsV1 *metrics;
|
||||
int metricsCount;
|
||||
driver.cs.getMetricsV1(&metrics, &metricsCount);
|
||||
printf("#################### METRICS FOR %s ####################\n",
|
||||
argv[i]);
|
||||
for (int i = 0; i < metricsCount; ++i) {
|
||||
printf("# HELP %s %s\n", metrics[i].name, metrics[i].help);
|
||||
printf("# TYPE %s %s\n", metrics[i].name,
|
||||
metrics[i].type == metrics[i].Counter ? "counter" : "gauge");
|
||||
printf("%s %g\n", metrics[i].name, metrics[i].getValue());
|
||||
{
|
||||
ConflictSet::MetricsV1 *metrics;
|
||||
int metricsCount;
|
||||
driver1.cs.getMetricsV1(&metrics, &metricsCount);
|
||||
printf("#################### METRICS for ConflictSet 1 for %s "
|
||||
"####################\n",
|
||||
argv[i]);
|
||||
for (int i = 0; i < metricsCount; ++i) {
|
||||
printf("# HELP %s %s\n", metrics[i].name, metrics[i].help);
|
||||
printf("# TYPE %s %s\n", metrics[i].name,
|
||||
metrics[i].type == metrics[i].Counter ? "counter" : "gauge");
|
||||
printf("%s %g\n", metrics[i].name, metrics[i].getValue());
|
||||
}
|
||||
puts("");
|
||||
}
|
||||
{
|
||||
ConflictSet::MetricsV1 *metrics;
|
||||
int metricsCount;
|
||||
driver2.cs.getMetricsV1(&metrics, &metricsCount);
|
||||
printf("#################### METRICS for ConflictSet 2 for %s "
|
||||
"####################\n",
|
||||
argv[i]);
|
||||
for (int i = 0; i < metricsCount; ++i) {
|
||||
printf("# HELP %s %s\n", metrics[i].name, metrics[i].help);
|
||||
printf("# TYPE %s %s\n", metrics[i].name,
|
||||
metrics[i].type == metrics[i].Counter ? "counter" : "gauge");
|
||||
printf("%s %g\n", metrics[i].name, metrics[i].getValue());
|
||||
}
|
||||
puts("");
|
||||
}
|
||||
puts("");
|
||||
}
|
||||
}
|
||||
|
BIN
corpus/004a3d124875e031f4c28421b43c131abda8f376
Normal file
BIN
corpus/004a3d124875e031f4c28421b43c131abda8f376
Normal file
Binary file not shown.
Binary file not shown.
BIN
corpus/0092e9f642b6f4d2cc1f3e6a16bf59624107aa1d
Normal file
BIN
corpus/0092e9f642b6f4d2cc1f3e6a16bf59624107aa1d
Normal file
Binary file not shown.
BIN
corpus/0112c3723c9ab42395c0f74e446998c0c63e8aef
Normal file
BIN
corpus/0112c3723c9ab42395c0f74e446998c0c63e8aef
Normal file
Binary file not shown.
Binary file not shown.
BIN
corpus/01a8d6a44f22aa06b638a795f8a2dffd1ba9b0a8
Normal file
BIN
corpus/01a8d6a44f22aa06b638a795f8a2dffd1ba9b0a8
Normal file
Binary file not shown.
Binary file not shown.
BIN
corpus/01ce88737ddc4d23f78bd6fe13dfbb5e1c5ffb18
Normal file
BIN
corpus/01ce88737ddc4d23f78bd6fe13dfbb5e1c5ffb18
Normal file
Binary file not shown.
BIN
corpus/021f64c6c477dc26894e5bc701554b1187fd3d0b
Normal file
BIN
corpus/021f64c6c477dc26894e5bc701554b1187fd3d0b
Normal file
Binary file not shown.
Binary file not shown.
BIN
corpus/02fa9006f44b0d14655ffc31635a1a9df302225f
Normal file
BIN
corpus/02fa9006f44b0d14655ffc31635a1a9df302225f
Normal file
Binary file not shown.
Binary file not shown.
BIN
corpus/04113be6af30d9ce06aa1da99259f797dee4b827
Normal file
BIN
corpus/04113be6af30d9ce06aa1da99259f797dee4b827
Normal file
Binary file not shown.
BIN
corpus/046d2c5bf09695809fe03ce5e8650ee03c86e767
Normal file
BIN
corpus/046d2c5bf09695809fe03ce5e8650ee03c86e767
Normal file
Binary file not shown.
BIN
corpus/048559df8c0ed2fdf38a177d7fe1afb40f3d034d
Normal file
BIN
corpus/048559df8c0ed2fdf38a177d7fe1afb40f3d034d
Normal file
Binary file not shown.
Binary file not shown.
BIN
corpus/04cf08496c406ee4442f596a87000a1768cd0a94
Normal file
BIN
corpus/04cf08496c406ee4442f596a87000a1768cd0a94
Normal file
Binary file not shown.
BIN
corpus/06a3915af45c58d5edad76f7192d00dc71aefdc3
Normal file
BIN
corpus/06a3915af45c58d5edad76f7192d00dc71aefdc3
Normal file
Binary file not shown.
BIN
corpus/06dcf68e4bdbe913d3b272e3d4b1dc6f77309f2d
Normal file
BIN
corpus/06dcf68e4bdbe913d3b272e3d4b1dc6f77309f2d
Normal file
Binary file not shown.
BIN
corpus/06e7021fcbe50e9fd239738577bc87e54ac491b2
Normal file
BIN
corpus/06e7021fcbe50e9fd239738577bc87e54ac491b2
Normal file
Binary file not shown.
BIN
corpus/076402dbe642f66076a44d56c79034eeec433142
Normal file
BIN
corpus/076402dbe642f66076a44d56c79034eeec433142
Normal file
Binary file not shown.
Binary file not shown.
BIN
corpus/08a5364e7da8be32f3dbffcb5ad9fc636cdfb461
Normal file
BIN
corpus/08a5364e7da8be32f3dbffcb5ad9fc636cdfb461
Normal file
Binary file not shown.
Binary file not shown.
BIN
corpus/09f7205079111282e06b972b7b0148077c780a15
Normal file
BIN
corpus/09f7205079111282e06b972b7b0148077c780a15
Normal file
Binary file not shown.
BIN
corpus/0a95ed480d47305499128ff09afba6bbdbec5a5c
Normal file
BIN
corpus/0a95ed480d47305499128ff09afba6bbdbec5a5c
Normal file
Binary file not shown.
BIN
corpus/0ab276238fb98a371fafe99e7c98558c07baef7e
Normal file
BIN
corpus/0ab276238fb98a371fafe99e7c98558c07baef7e
Normal file
Binary file not shown.
Binary file not shown.
BIN
corpus/0b471bdfb0cf6af786adf2cf8bc3fc1bae62860c
Normal file
BIN
corpus/0b471bdfb0cf6af786adf2cf8bc3fc1bae62860c
Normal file
Binary file not shown.
BIN
corpus/0b4ba4b5f7cc077a6f0ef5d48bcea80118ef7aa2
Normal file
BIN
corpus/0b4ba4b5f7cc077a6f0ef5d48bcea80118ef7aa2
Normal file
Binary file not shown.
BIN
corpus/0b4c470b5893ca01dd32e15b8082d48f48617fd1
Normal file
BIN
corpus/0b4c470b5893ca01dd32e15b8082d48f48617fd1
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
corpus/0b741f462204a40a55522bc307fcafa4099530cc
Normal file
BIN
corpus/0b741f462204a40a55522bc307fcafa4099530cc
Normal file
Binary file not shown.
Binary file not shown.
BIN
corpus/0b90760335f1b17bc108bcff27a95ad88231d5e4
Normal file
BIN
corpus/0b90760335f1b17bc108bcff27a95ad88231d5e4
Normal file
Binary file not shown.
BIN
corpus/0ba4f637960e9e2696f9415be7bc6c5759bf927e
Normal file
BIN
corpus/0ba4f637960e9e2696f9415be7bc6c5759bf927e
Normal file
Binary file not shown.
Binary file not shown.
BIN
corpus/0c93df22a52831a77be1e65a1d3c56d80825940b
Normal file
BIN
corpus/0c93df22a52831a77be1e65a1d3c56d80825940b
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
corpus/0d99bee638044b26e13b57a0db5ee82740dfd312
Normal file
BIN
corpus/0d99bee638044b26e13b57a0db5ee82740dfd312
Normal file
Binary file not shown.
Binary file not shown.
BIN
corpus/0e1e4a2e118140a221e4bbc9251059c7a0e34f49
Normal file
BIN
corpus/0e1e4a2e118140a221e4bbc9251059c7a0e34f49
Normal file
Binary file not shown.
BIN
corpus/0ed829974af554e6c3b5ed9fb845333ccf5d8c1d
Normal file
BIN
corpus/0ed829974af554e6c3b5ed9fb845333ccf5d8c1d
Normal file
Binary file not shown.
BIN
corpus/0eebea0577f503e082c47691fec2651467eeaf5f
Normal file
BIN
corpus/0eebea0577f503e082c47691fec2651467eeaf5f
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
5
corpus/0f5c5f28c31e44ee0ec085fec09adf0981065771
Normal file
5
corpus/0f5c5f28c31e44ee0ec085fec09adf0981065771
Normal file
@@ -0,0 +1,5 @@
|
||||
|
||||
<EFBFBD><EFBFBD>
|
||||
|
||||
|
||||
2
|
Binary file not shown.
BIN
corpus/104fd2d945317d09b2c44ea57e9e333f49115c76
Normal file
BIN
corpus/104fd2d945317d09b2c44ea57e9e333f49115c76
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
corpus/123d84d187ef92218bcb439255db737cae375151
Normal file
BIN
corpus/123d84d187ef92218bcb439255db737cae375151
Normal file
Binary file not shown.
BIN
corpus/129a26abd16441eb995a2fad52fbce02112e4d20
Normal file
BIN
corpus/129a26abd16441eb995a2fad52fbce02112e4d20
Normal file
Binary file not shown.
Binary file not shown.
1
corpus/12bdd00fd4038756cbcf8ecdad1b0cd862603cd8
Normal file
1
corpus/12bdd00fd4038756cbcf8ecdad1b0cd862603cd8
Normal file
@@ -0,0 +1 @@
|
||||
<EFBFBD>
|
BIN
corpus/12cea490706f122949fa348f9de2a3ace31d56d2
Normal file
BIN
corpus/12cea490706f122949fa348f9de2a3ace31d56d2
Normal file
Binary file not shown.
BIN
corpus/12ecc1deca18dccdf8459fe63905bf51ced8b776
Normal file
BIN
corpus/12ecc1deca18dccdf8459fe63905bf51ced8b776
Normal file
Binary file not shown.
BIN
corpus/131c2ff7d2742dc4f468d6c87c4e3964a95db144
Normal file
BIN
corpus/131c2ff7d2742dc4f468d6c87c4e3964a95db144
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
corpus/1363c70a6cb83cf8f0d79c316449b7b59aebf68d
Normal file
BIN
corpus/1363c70a6cb83cf8f0d79c316449b7b59aebf68d
Normal file
Binary file not shown.
BIN
corpus/147776bc8ae88fe97d2d51a00d5868a981cdd44d
Normal file
BIN
corpus/147776bc8ae88fe97d2d51a00d5868a981cdd44d
Normal file
Binary file not shown.
BIN
corpus/1478958bdc54001cb65507dc6b98bfd35d00c3b2
Normal file
BIN
corpus/1478958bdc54001cb65507dc6b98bfd35d00c3b2
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
corpus/159a974ac30ebe83f44dea1d43b6cdd45bcb56b3
Normal file
BIN
corpus/159a974ac30ebe83f44dea1d43b6cdd45bcb56b3
Normal file
Binary file not shown.
BIN
corpus/16638187a55c2c126a8b6f46cbb708e83573c1ea
Normal file
BIN
corpus/16638187a55c2c126a8b6f46cbb708e83573c1ea
Normal file
Binary file not shown.
Binary file not shown.
BIN
corpus/169a539673da8f98fd8a6941b36bdb80622e5d68
Normal file
BIN
corpus/169a539673da8f98fd8a6941b36bdb80622e5d68
Normal file
Binary file not shown.
BIN
corpus/16bae93ce7f55257f650cc0e095b613191e07e0c
Normal file
BIN
corpus/16bae93ce7f55257f650cc0e095b613191e07e0c
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
corpus/18e24277a0bc2a47e9262fd2282ca68f5aa5c09b
Normal file
BIN
corpus/18e24277a0bc2a47e9262fd2282ca68f5aa5c09b
Normal file
Binary file not shown.
Binary file not shown.
BIN
corpus/19149503d26fa7a5add35147a8b77dd436213003
Normal file
BIN
corpus/19149503d26fa7a5add35147a8b77dd436213003
Normal file
Binary file not shown.
Binary file not shown.
BIN
corpus/1a9cbbcb6e0d6ea624ac16e0e72a420056f60885
Normal file
BIN
corpus/1a9cbbcb6e0d6ea624ac16e0e72a420056f60885
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
corpus/1bdd11c6a929e0695d33db2b25136d11b786747a
Normal file
BIN
corpus/1bdd11c6a929e0695d33db2b25136d11b786747a
Normal file
Binary file not shown.
BIN
corpus/1be0b3f143ffa33fae34725306c6c07d6175e01a
Normal file
BIN
corpus/1be0b3f143ffa33fae34725306c6c07d6175e01a
Normal file
Binary file not shown.
Binary file not shown.
BIN
corpus/1c3b103b6b47a392401f1354f2fd53f882e81541
Normal file
BIN
corpus/1c3b103b6b47a392401f1354f2fd53f882e81541
Normal file
Binary file not shown.
BIN
corpus/1c999c8cb335e3cc099a6220bab1a43d69164540
Normal file
BIN
corpus/1c999c8cb335e3cc099a6220bab1a43d69164540
Normal file
Binary file not shown.
Binary file not shown.
BIN
corpus/1d41b59576afaad2b0e6171aa048e13c5600a558
Normal file
BIN
corpus/1d41b59576afaad2b0e6171aa048e13c5600a558
Normal file
Binary file not shown.
Binary file not shown.
BIN
corpus/1dace1035ef72ca4dd3f0c9c217634e2ac837c48
Normal file
BIN
corpus/1dace1035ef72ca4dd3f0c9c217634e2ac837c48
Normal file
Binary file not shown.
BIN
corpus/1e63a3b3aeec146191fbbaad648701cd41bc97ef
Normal file
BIN
corpus/1e63a3b3aeec146191fbbaad648701cd41bc97ef
Normal file
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user