question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't update problem status with [WARN] Failed to get memory percentile.

See original GitHub issue

🐛 Bug Report

When I submitted the answer and get accepted, the last line of the response was [WARN] Failed to get memory percentile.

And with this warning, the problem status cannot be updated, even though my answer was accepted.

problem

response

To Reproduce

Just submit the question.

Expected behavior

Problem status not updated

Your Environment

  • os: Windows 10, 1809
  • extension settings:
  • nodejs version: v10.15.2
  • vscode version: 1.32.1
  • extension version: 0.12.0

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
Vigilanscommented, Mar 12, 2019

@tomleung1996 Yes, I failed to trigger the warning.

After some efforts of investigation, I finally get to know that it is not the problem with skygragon’s leetcode-cli, but @jdneo 's forked version.

There’s

        if (result.memory && result.memory_percentile)
          printLine(result, 'Your memory usage beats %d %% of %s submissions (%s)',
              result.memory_percentile.toFixed(2), result.lang, result.memory);
        else
          return log.warn('Failed to get memory percentile.');

And at the last line of function there is:

      // update this problem status in local cache
      core.updateProblem(problem, {state: (result.ok ? 'ac' : 'notac')});

Originally, the former code logic was wrapped in a callback, so when log.warn makes the callback returns, the latter code can still be executed.

Yet now the former code is exposed in the same level as the latter, so when the return is met, the latter code is skipped, resulting in the local cache not updated.

If you delete the cache in $HOME/.lc, the behavior may return right.

0reactions
jdneocommented, Mar 13, 2019

Cool!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Go expvar does not work on metrics containing / #1060 - GitHub
I have a lot of metrics on the form app/foo/bar , which are not imported into the datadog charts. Examples of metrics: ubuntu@35:~$...
Read more >
How to chart performance with VM insights - Azure Monitor
Choose Virtual Machines in the Solutions section. Select the Performance tab. VM insights Performance Top N List view. On the Top N Charts...
Read more >
Use percentiles to analyze application performance - Dynatrace
Learn how percentiles are better than averages in understanding the real performance characteristics of your application.
Read more >
Troubleshoot the Monitoring agent | Google Cloud
This message indicates that the status update of memory throttling fails once. It is normally harmless, but could be a sign that the...
Read more >
Fix common cluster issues | Elasticsearch Guide [8.5] | Elastic
This error indicates a data node is critically low on disk space and has reached the flood-stage disk usage watermark. Circuit breaker errors:...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found