Skip to content

Add crates.io benchmark #2146

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

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 5 additions & 0 deletions collector/compile-benchmarks/REUSE.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ path = "cranelift-codegen-0.119.0/**"
SPDX-FileCopyrightText = "The Cranelift Project Developers"
SPDX-License-Identifier = "Apache-2.0 WITH LLVM-exception"

[[annotations]]
path = "crates.io/**"
SPDX-FileCopyrightText = "The Rust Project Developers (see https://thanks.rust-lang.org)"
SPDX-License-Identifier = "MIT OR Apache-2.0"

[[annotations]]
path = "ctfe-stress-5/**"
SPDX-FileCopyrightText = "The Rust Project Developers (see https://thanks.rust-lang.org)"
Expand Down
1 change: 1 addition & 0 deletions collector/compile-benchmarks/crates.io/.buildpacks
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://github.com/Turbo87/heroku-buildpack-crates-io#9f7dc067dcda506ea94ca2d77f863588c5558241
1 change: 1 addition & 0 deletions collector/compile-benchmarks/crates.io/.dockerignore
32 changes: 32 additions & 0 deletions collector/compile-benchmarks/crates.io/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# EditorConfig helps developers define and maintain consistent
# coding styles between different editors and IDEs
# editorconfig.org

root = true

[*]
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = space
indent_size = 4

[*.{js,ts}]
indent_size = 2

[*.json]
indent_size = 2

[*.hbs]
insert_final_newline = false
indent_size = 2

[*.html]
indent_size = 2

[*.{diff,md}]
trim_trailing_whitespace = false

[*.{yml,yaml}]
indent_size = 2
9 changes: 9 additions & 0 deletions collector/compile-benchmarks/crates.io/.ember-cli
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
/**
Ember CLI sends analytics information by default. The data is completely
anonymous, but there are times when you might want to disable this behavior.

Setting `disableAnalytics` to true will prevent any data from being sent.
*/
"disableAnalytics": false
}
93 changes: 93 additions & 0 deletions collector/compile-benchmarks/crates.io/.env.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
# Location of the *postgres* database. For example, if you have created a
# blank database locally named `cargo_registry`, this would be
# `postgres://postgres@localhost/cargo_registry`.
export DATABASE_URL=

# Allowed origins - any origins for which you want to allow browser
# access to authenticated endpoints.
export WEB_ALLOWED_ORIGINS=http://localhost:8888,http://localhost:4200

# If you're running an instance of the application on a domain different than
# crates.io, uncomment this line and set the variable to your domain name.
# export DOMAIN_NAME=staging.crates.io

# Key to sign and encrypt cookies with. Must be at least 32 bytes. Change this
# to a long, random string for production.
export SESSION_KEY=badkeyabcdefghijklmnopqrstuvwxyzabcdef

# If you will be running the tests, set this to another database that you
# have created. For example, if your test database is named
# `cargo_registry_test`, this would look something like
# `postgres://postgres@localhost/cargo_registry_test`
# If you don't plan on running the tests, you can leave this blank.
export TEST_DATABASE_URL=

# Credentials for AWS.
# export AWS_ACCESS_KEY=
# export AWS_SECRET_KEY=

# Configuration for uploading packages to S3. You can leave these commented
# out if you're not publishing to s3 from your crates.io instance.
# Uses AWS credentials.
# export S3_BUCKET=
# not needed if the S3 bucket is in US standard
# export S3_REGION=

# Configuration for uploading index metadata to S3. You can leave these commented
# out if you're not publishing index metadata to s3 from your crates.io instance.
# Uses AWS credentials.
# export S3_INDEX_BUCKET=
# not needed if the S3 bucket is in US standard
# export S3_INDEX_REGION=

# Configuration for invalidating cached files on CloudFront. You can leave these
# commented out if you're not using CloudFront caching for the index files.
# Uses AWS credentials.
# export CLOUDFRONT_DISTRIBUTION=

# Configuration for the CDN log queue. You can leave these commented out if
# you're not using the CDN log queue.
# export CDN_LOG_QUEUE_ACCESS_KEY=
# export CDN_LOG_QUEUE_SECRET_KEY=
# export CDN_LOG_QUEUE_URL=
# export CDN_LOG_QUEUE_REGION=

# Configuration for the version downloads data archive.
# You can leave these commented out if you're not using the archival process.
# export DOWNLOADS_ARCHIVE_ACCESS_KEY=
# export DOWNLOADS_ARCHIVE_SECRET_KEY=
# export DOWNLOADS_ARCHIVE_REGION=
# export DOWNLOADS_ARCHIVE_BUCKET=

# Upstream location of the registry index. Background jobs will push to
# this URL. The default points to a local index for development.
# Run `./script/init-local-index.sh` to initialize this repo.
export GIT_REPO_URL=file://$PWD/tmp/index-bare

# Credentials for talking to GitHub. You can leave these blank if you're
# not logging into your crates.io instance.
# When registering a new application on GitHub for use with your local
# crates.io instance, be sure to set the callback url for that application
# to the address `http://localhost:4200/github-redirect.html`.
export GH_CLIENT_ID=
export GH_CLIENT_SECRET=

# Credentials for configuring Mailgun. You can leave these commented out
# if you are not interested in actually sending emails. If left empty,
# a mock email will be sent to a file in your local '/tmp/' directory.
# If interested in setting up Mailgun to send emails, you will have
# to create an account with Mailgun and modify these manually.
# If running a crates mirror on heroku, you can instead add the Mailgun
# app to your instance and shouldn't have to mess with these.
# export MAILGUN_SMTP_LOGIN=
# export MAILGUN_SMTP_PASSWORD=
# export MAILGUN_SMTP_SERVER=

# Credentials for connecting to the Sentry error reporting service.
# export SENTRY_DSN_API=
export SENTRY_ENV_API=local

# Base URL for the service from which the OpenGraph images
# for crates are loaded. Make sure the URL ends
# with a `/`.
export OG_IMAGE_BASE_URL="http://localhost:3000/og/"
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Bug report
description: Create a report to help us improve
labels: ['C-bug']
body:
- type: textarea
attributes:
label: Current Behavior
description: A concise description of what you're experiencing.
validations:
required: true

- type: textarea
attributes:
label: Expected Behavior
description: A concise description of what you expected to happen.
validations:
required: true

- type: textarea
attributes:
label: Steps To Reproduce
description: Steps to reproduce the behavior.
placeholder: |
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
validations:
required: false

- type: textarea
attributes:
label: Environment
description: |
examples:
- **Browser**: Safari 15.1
- **OS**: macOS 11.6.1
value: |
- Browser:
- OS:
validations:
required: false

- type: textarea
attributes:
label: Anything else?
description: |
Links? References? Anything that will give us more context about the issue you are encountering!

Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in.
validations:
required: false
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: true
contact_links:
- name: Feature request
about: Suggest an idea for this project
url: https://github.com/rust-lang/crates.io/discussions/new
79 changes: 79 additions & 0 deletions collector/compile-benchmarks/crates.io/.github/renovate.json5
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
{
extends: [
"config:best-practices",
":pinAllExceptPeerDependencies",
":maintainLockFilesWeekly",
":prConcurrentLimitNone",
":prHourlyLimitNone",
":semanticCommitsDisabled",
":automergeLinters",
":automergeTesters",
"customManagers:dockerfileVersions",
"customManagers:githubActionsVersions",
"github>Turbo87/renovate-config//rust/updateToolchain",
],
packageRules: [
{
matchCategories: ["rust"],
labels: ["A-backend ⚙️"],
},
{
matchCategories: ["js"],
labels: ["A-frontend 🐹"],
},
{
matchDepNames: ["ember-cli", "ember-data", "ember-source"],
separateMinorPatch: true,
},
{
matchDepNames: [
"@percy/cli",
"tj-actions/changed-files",
"webpack",
],
extends: ["schedule:weekly"],
},
{
// Avoid "Artifact update problem" for pnpm updates when the renovatebot
// setup does not support the new version yet.
matchDepNames: ["pnpm"],
minimumReleaseAge: "24 hours",
},
{
matchCategories: ["js"],
matchUpdateTypes: ["lockFileMaintenance"],
additionalBranchPrefix: "js-",
commitMessageSuffix: "(JS)",
},
{
matchCategories: ["rust"],
matchUpdateTypes: ["lockFileMaintenance"],
additionalBranchPrefix: "rust-",
commitMessageSuffix: "(Rust)",
},
{
matchManagers: ["custom.regex"],
matchDepNames: ["rust"],
commitMessageTopic: "Rust",
labels: ["A-backend ⚙️"],
},
{
matchDepNames: ["/^diesel$/", "/^diesel_/"],
groupName: "diesel packages",
},
{
matchDepNames: ["aws-ip-ranges"],
automerge: true,
},
{
matchUpdateTypes: ["digest"],
enabled: false,
},
{
// This is causing various issues, so we disable it for now.
matchDatasources: ["docker"],
matchUpdateTypes: ["pinDigest"],
enabled: false
},
],
}
Loading
Loading