Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
catdogpandas committed Jan 15, 2025
1 parent 4db3f54 commit 0a6d8c8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion core/prometheus/schedulers/ScrapeScheduler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ ScrapeScheduler::ScrapeScheduler(std::shared_ptr<ScrapeConfig> scrapeConfigPtr,
mTargetInfo(targetInfo),
mQueueKey(queueKey),
mInputIndex(inputIndex),
mScrapeResponseSizeBytes(0) {
mScrapeResponseSizeBytes(-1) {
mInterval = mScrapeConfigPtr->mScrapeIntervalSeconds;
}

Expand Down
4 changes: 2 additions & 2 deletions core/prometheus/schedulers/ScrapeScheduler.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class ScrapeScheduler : public BaseScheduler {
std::string GetId() const;

void SetComponent(std::shared_ptr<Timer> timer, EventPool* eventPool);
uint64_t GetLastScrapeSize() const { return mScrapeResponseSizeBytes; }
int64_t GetLastScrapeSize() const { return mScrapeResponseSizeBytes; }

uint64_t GetReBalanceMs() const { return mTargetInfo.mRebalanceMs; }
void ScheduleNext() override;
Expand All @@ -78,7 +78,7 @@ class ScrapeScheduler : public BaseScheduler {
size_t mInputIndex;

// auto metrics
std::atomic_uint64_t mScrapeResponseSizeBytes;
std::atomic_int mScrapeResponseSizeBytes;

// self monitor
std::shared_ptr<PromSelfMonitorUnsafe> mSelfMonitor;
Expand Down

0 comments on commit 0a6d8c8

Please sign in to comment.