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

Use resource statistics to adjust resource score #2

Open
soichih opened this issue Sep 28, 2017 · 1 comment
Open

Use resource statistics to adjust resource score #2

soichih opened this issue Sep 28, 2017 · 1 comment

Comments

@soichih
Copy link
Contributor

soichih commented Sep 28, 2017

/resource/stats/:id API now provides following statistics


  "find": {
    "resource_id": "57902acad5db11477c94c1aa"
  },
  "counts": {
    "finished": 4,
    "running": 3,
    "removed": 1,
    "failed": 1
  },
  "services": [
    {
      "_id": {
        "service": "soichih/app-test",
        "status": "failed"
      },
      "count": 1
    },
    {
      "_id": {
        "service": "soichih/app-test",
        "status": "running"
      },
      "count": 2
    },
    {
      "_id": {
        "service": "brain-life/app-networkneuro",
        "status": "running"
      },
      "count": 1
    },
    {
      "_id": {
        "service": "soichih/app-test",
        "status": "removed"
      },
      "count": 1
    },
    {
      "_id": {
        "service": "soichih/app-test",
        "status": "finished"
      },
      "count": 4
    }
  ]
}

I should polish this (maybe allow querying based on service so that I can make a single query to get all info?) and adjust resource score based on past service performance on that resource. For example, there is no point of keep submitting to resource that the service always fails.

@soichih
Copy link
Contributor Author

soichih commented Sep 28, 2017

If I do provide service centric stats, for each resource, I should also include average waiting / running time. Such information is valuable for determining the final resource score.

The service centric stats can also be used by warehouse under application detail page to show some interesting statistics about the app.

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

1 participant