main.cpp 450 B

123456789101112131415161718
  1. #include <library/cpp/monlib/encode/prometheus/prometheus.h>
  2. #include <library/cpp/monlib/encode/fake/fake.h>
  3. #include <util/stream/mem.h>
  4. extern "C" int LLVMFuzzerTestOneInput(const ui8* buf, size_t size) {
  5. using namespace NMonitoring;
  6. try {
  7. TStringBuf data(reinterpret_cast<const char*>(buf), size);
  8. auto encoder = EncoderFake();
  9. DecodePrometheus(data, encoder.Get());
  10. } catch (...) {
  11. }
  12. return 0;
  13. }