mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
WIP test for the conservative cost function in constraint solver
This commit is contained in:
@@ -299,6 +299,167 @@ Tinytest.add("constraint solver - benchmark on gems - rails, gitlabhq", function
|
||||
r.resolve(args.dependencies, args.constraints);
|
||||
});
|
||||
|
||||
Tinytest.add("constraint solver - benchmark on gems - rails, gitlabhq, additions to the existing smaller solution", function (test) {
|
||||
var r = new ConstraintSolver.PackagesResolver(railsCatalog);
|
||||
|
||||
var args = splitArgs({
|
||||
'rails': '4.0.0',
|
||||
'protected_attributes': null,
|
||||
'rails-observers': null,
|
||||
'actionpack-page_caching': null,
|
||||
'actionpack-action_caching': null,
|
||||
'default_value_for': '3.0.0',
|
||||
'mysql2': null,
|
||||
'devise': '3.0.4',
|
||||
'devise-async': '0.8.0',
|
||||
'omniauth': '1.1.3',
|
||||
'omniauth-google-oauth2': null,
|
||||
'omniauth-twitter': null,
|
||||
'omniauth-github': null,
|
||||
'gitlab_git': '5.7.1',
|
||||
'gitlab-grack': '2.0.0',
|
||||
'gitlab_omniauth-ldap': '1.0.4',
|
||||
'gitlab-gollum-lib': '1.1.0',
|
||||
'gitlab-linguist': '3.0.0',
|
||||
'grape': '0.6.1',
|
||||
'rack-cors': null,
|
||||
'email_validator': '1.4.0',
|
||||
'stamp': null,
|
||||
'enumerize': null,
|
||||
'kaminari': '0.15.1',
|
||||
'haml-rails': null,
|
||||
'carrierwave': null,
|
||||
'fog': '1.3.1',
|
||||
'six': null,
|
||||
'seed-fu': null,
|
||||
'redcarpet': '2.2.2',
|
||||
'github-markup': '0.7.4',
|
||||
'asciidoctor': null,
|
||||
'unicorn': '4.6.3',
|
||||
'unicorn-worker-killer': null,
|
||||
'state_machine': null,
|
||||
'acts-as-taggable-on': null,
|
||||
'slim': null,
|
||||
'sinatra': null,
|
||||
'sidekiq': null,
|
||||
'httparty': null,
|
||||
'colored': null,
|
||||
'settingslogic': null,
|
||||
'foreman': null,
|
||||
'version_sorter': null,
|
||||
'redis-rails': null,
|
||||
'tinder': '1.9.2',
|
||||
'hipchat': '0.14.0',
|
||||
'gemnasium-gitlab-service': '0.2.0',
|
||||
'slack-notifier': '0.2.0',
|
||||
'd3_rails': '3.1.4',
|
||||
'underscore-rails': '1.4.4',
|
||||
'sanitize': null,
|
||||
'rack-attack': null,
|
||||
'ace-rails-ap': null,
|
||||
'sass-rails': null,
|
||||
'coffee-rails': null,
|
||||
'uglifier': null,
|
||||
'therubyracer': null,
|
||||
'turbolinks': null,
|
||||
'jquery-turbolinks': null,
|
||||
'select2-rails': null,
|
||||
'jquery-atwho-rails': '0.3.3',
|
||||
'jquery-rails': '2.1.3',
|
||||
'jquery-ui-rails': '2.0.2',
|
||||
'modernizr': '2.6.2',
|
||||
'raphael-rails': '2.1.2',
|
||||
'bootstrap-sass': '3.0.0',
|
||||
'font-awesome-rails': '3.2.0',
|
||||
'gitlab_emoji': '0.0.1',
|
||||
'gon': '5.0.0'
|
||||
});
|
||||
|
||||
var previousSolution = {
|
||||
"actionmailer": "4.0.0",
|
||||
"actionpack": "4.0.0",
|
||||
"activemodel": "4.0.0",
|
||||
"activerecord": "4.0.0",
|
||||
"activerecord-deprecated_finders": "1.0.3",
|
||||
"activesupport": "4.0.0",
|
||||
"arel": "4.0.2",
|
||||
"asciidoctor": "0.1.4",
|
||||
"bcrypt": "3.1.7",
|
||||
"bcrypt-ruby": "3.1.5",
|
||||
"builder": "3.1.4",
|
||||
"carrierwave": "0.10.0",
|
||||
"coffee-rails": "4.0.1",
|
||||
"coffee-script": "2.2.0",
|
||||
"coffee-script-source": "1.7.0",
|
||||
"d3_rails": "3.1.4",
|
||||
"default_value_for": "3.0.0",
|
||||
"devise": "3.0.4",
|
||||
"devise-async": "0.8.0",
|
||||
"erubis": "2.7.0",
|
||||
"execjs": "2.0.2",
|
||||
"faraday": "0.9.0",
|
||||
"github-markup": "1.1.0",
|
||||
"haml": "4.0.5",
|
||||
"haml-rails": "0.5.1",
|
||||
"hashie": "2.0.3",
|
||||
"hike": "1.2.3",
|
||||
"httpauth": "0.2.1",
|
||||
"i18n": "0.6.9",
|
||||
"jquery-turbolinks": "2.0.2",
|
||||
"json": "1.8.1",
|
||||
"jwt": "0.1.10",
|
||||
"kaminari": "0.15.1",
|
||||
"mail": "2.5.4",
|
||||
"mime-types": "1.25.1",
|
||||
"minitest": "4.7.5",
|
||||
"multi_json": "1.9.0",
|
||||
"multipart-post": "2.0.0",
|
||||
"oauth": "0.4.7",
|
||||
"oauth2": "0.8.1",
|
||||
"omniauth": "1.1.4",
|
||||
"omniauth-github": "1.0.2",
|
||||
"omniauth-google-oauth2": "0.2.2",
|
||||
"omniauth-oauth": "1.0.1",
|
||||
"omniauth-oauth2": "1.1.1",
|
||||
"omniauth-twitter": "1.0.1",
|
||||
"orm_adapter": "0.5.0",
|
||||
"polyglot": "0.3.4",
|
||||
"posix-spawn": "0.3.8",
|
||||
"protected_attributes": "1.0.3",
|
||||
"rack": "1.5.2",
|
||||
"rack-test": "0.6.2",
|
||||
"rails": "4.0.0",
|
||||
"rails-observers": "0.1.2",
|
||||
"railties": "4.0.0",
|
||||
"rake": "10.1.1",
|
||||
"redcarpet": "2.2.2",
|
||||
"ref": "1.0.5",
|
||||
"sass": "3.2.17",
|
||||
"sass-rails": "4.0.2",
|
||||
"seed-fu": "2.3.0",
|
||||
"six": "0.2.0",
|
||||
"sprockets": "2.11.0",
|
||||
"sprockets-rails": "2.0.1",
|
||||
"therubyracer": "0.12.1",
|
||||
"thor": "0.19.1",
|
||||
"thread_safe": "0.3.1",
|
||||
"tilt": "1.4.1",
|
||||
"treetop": "1.4.15",
|
||||
"turbolinks": "2.2.0",
|
||||
"tzinfo": "0.3.39",
|
||||
"uglifier": "2.5.0",
|
||||
"warden": "1.2.3"
|
||||
};
|
||||
|
||||
var solution = r.resolve(args.dependencies, args.constraints, { previousSolution: previousSolution });
|
||||
|
||||
// check that root deps are the same
|
||||
_.each(args.dependencies, function (dep) {
|
||||
if (previousSolution[dep])
|
||||
test.equal(solution[dep], previousSolution[dep]);
|
||||
});
|
||||
});
|
||||
|
||||
// Given a set of gems definitions returns a Catalog-like object
|
||||
function getCatalogStub (gems) {
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user