Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Top ten worst bundles are determined by lexicographic rather than numeric sorting #8

Open
mikeweilgart opened this issue Aug 23, 2017 · 1 comment

Comments

@mikeweilgart
Copy link

Top 10 worst, bundles:
    1.  5.78638s  : [redacted]
    2.  41.34302s  : [redaced]
    3.  4.71288s  : inventory_autorun

I expect this bug will not manifest unless there is at least one bundle that runs for over 10 seconds and at least one bundle that runs for 1-9 seconds. (In other words, there has to be a difference between lexicographic and numeric sort order for this issue to be visible.)

@atsaloli
Copy link

The fix for this issue is in #5 from over a year ago.

I'm afraid it looks like this project is no longer maintained.

@mikeweilgart : it's a 3 byte change and I've verified that it works, if you want to update your local copy.

To duplicate this issue, I put "/bin/sleep 4" in test and "/bin/sleep 11" in main:

Top 10 worst, bundles:
    1.  4.02403s  : test
    2.  15.05754s  : main
    3.  1.72461s  : cfe_internal_management
    4.  1.02561s  : cfe_internal_enterprise_main
    5.  0.64381s  : cfe_internal_enterprise_mission_portal
    6.  0.61825s  : cfe_internal_enterprise_mission_portal_apache
    7.  0.53955s  : cfe_internal_setup_knowledge
    8.  0.33595s  : cfe_internal_hub_maintain
    9.  0.20164s  : inventory_autorun
    10. 0.18930s  : cfe_internal_database_partitioning

I then changed stringwise comparison (cmp) to numeric (<=>)
and it sorted correctly:

Top 10 worst, bundles:
    1.  15.04905s  : main
    2.  4.02275s  : test
    3.  1.71564s  : cfe_internal_management
    4.  0.99795s  : cfe_internal_enterprise_main
    5.  0.65410s  : cfe_internal_enterprise_mission_portal
    6.  0.62744s  : cfe_internal_enterprise_mission_portal_apache
    7.  0.52309s  : cfe_internal_setup_knowledge
    8.  0.32974s  : cfe_internal_hub_maintain
    9.  0.20210s  : inventory_autorun
    10. 0.19028s  : cfe_internal_database_partitioning

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants