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.

Add a way to compute complexity based on something else than sloc

See original GitHub issue

What problem are you trying to solve?

We’re currently measuring complexity based on sloc. It’s nice but a long file doesn’t always mean it’s complex.

Describe the feature

We could add a --complexity-strategy=<sloc or cyclomatic or xyz> that would be used in the complexity processing.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
davemcg3commented, Sep 15, 2020

The algorithm just counts lines of code and returns that as complexity then? Would be good to have that in the readme. Looks like it comes from here: const result = await nodeSloc({ path: absolutePath }); Can open a PR for the README adjustment if you will confirm.

0reactions
simonrenoultcommented, Nov 11, 2022

Done in 4.3 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

What Is Code Complexity? What It Means and How to Measure It
Cyclomatic complexity measures the number of nested conditions within the code, such as those created by for, if/else, switch, while, and until.
Read more >
Hits-of-Code Instead of SLoC - Yegor Bugayenko
Hits-of-Code takes complexity into account, because the longer you work with that sorting algorithm the more modifications you make to its lines ...
Read more >
A Simple Understanding of Code Complexity - Codegrip
Source Lines of Code (SLOC) – It counts the number of lines in the source code. It is the most straightforward metric used...
Read more >
Is SLOC an effective (rough) measurement of computational ...
But the bigger the code base, the more likely it is that someone is actually ... and that's going to put a pretty...
Read more >
How to find time complexity of an algorithm? | Adrian Mejia Blog
Some functions are easy to analyze, but when you have loops, and recursion ... How to calculate time complexity of any algorithm or...
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