vmware / vmware/splinterdb

Fix & enhance platform_throttled_error_log() which is ignoring input 'sec' arg. Throttling of messages is basically non-functional.

Open
#336 0 comments 0 reactions 1 assignee View on GitHub

@gapisback is already working on this.

Since Mar 9, 2022.

Dominant language
C
Stars
732
Forks
67
PR merge metrics
No merged PRs in 30d

Description

Seems like platform_throttled_error_log() was written to emit progress messages periodically based on elapsed-time / timer, but its input arg sec is not being used.

This logging function is used in perf-tests, so it's not doing what it was supposed to do.

Grabbing a timer value from clock may itself be slow, affecting perf measurements.

An alternate solution would be to throttling of progress messages is done using a local counter variable. Each invocation of this macro will tick the counter.

We then print the message periodically as follows:

  • For 0, 9 - for each value,
  • Then, every 10th value
  • Then, every 100th value
  • Then, every 1000th value ... and so on

So for long-running code blocks, you will see progress reported, but the longer the thing runs, the less frequent the progress message will be.

Another option is to throttle and only print the message when the counter is at values which are (2**n); e.g. at 0, 2, 4, 8, 16, 32, 64, ... and so on.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.