Skip to content

Commit 54e1ff6

Browse files
committed
Add additional files
1 parent ebc9f72 commit 54e1ff6

File tree

3 files changed

+58
-0
lines changed

3 files changed

+58
-0
lines changed

collector/compile-benchmarks/REUSE.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,11 @@ path = "cranelift-codegen-0.119.0/**"
4747
SPDX-FileCopyrightText = "The Cranelift Project Developers"
4848
SPDX-License-Identifier = "Apache-2.0 WITH LLVM-exception"
4949

50+
[[annotations]]
51+
path = "crates.io/**"
52+
SPDX-FileCopyrightText = "The Rust Project Developers (see https://thanks.rust-lang.org)"
53+
SPDX-License-Identifier = "MIT OR Apache-2.0"
54+
5055
[[annotations]]
5156
path = "ctfe-stress-5/**"
5257
SPDX-FileCopyrightText = "The Rust Project Developers (see https://thanks.rust-lang.org)"
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
diff --git a/src/bin/server.rs b/src/bin/server.rs
2+
index 3303158c..b7589cf4 100644
3+
--- a/src/bin/server.rs
4+
+++ b/src/bin/server.rs
5+
@@ -2,7 +2,7 @@
6+
extern crate tracing;
7+
8+
use crates_io::middleware::normalize_path::normalize_path;
9+
-use crates_io::{App, Emails, metrics::LogEncoder};
10+
+use crates_io::{metrics::LogEncoder, App, Emails};
11+
use std::{sync::Arc, time::Duration};
12+
13+
use axum::ServiceExt;
14+
@@ -12,13 +12,14 @@ use reqwest::Client;
15+
use std::io::Write;
16+
use std::net::SocketAddr;
17+
use tokio::net::TcpListener;
18+
-use tokio::signal::unix::{SignalKind, signal};
19+
+use tokio::signal::unix::{signal, SignalKind};
20+
use tower::Layer;
21+
22+
const CORE_THREADS: usize = 4;
23+
24+
fn main() -> anyhow::Result<()> {
25+
let _sentry = crates_io::sentry::init();
26+
+ println!("hello from crates.io!");
27+
28+
// Initialize logging
29+
crates_io::util::tracing::init();
30+
@@ -116,13 +117,11 @@ fn log_instance_metrics_thread(app: Arc<App>) {
31+
None => return,
32+
};
33+
34+
- std::thread::spawn(move || {
35+
- loop {
36+
- if let Err(err) = log_instance_metrics_inner(&app) {
37+
- error!(?err, "log_instance_metrics error");
38+
- }
39+
- std::thread::sleep(interval);
40+
+ std::thread::spawn(move || loop {
41+
+ if let Err(err) = log_instance_metrics_inner(&app) {
42+
+ error!(?err, "log_instance_metrics error");
43+
}
44+
+ std::thread::sleep(interval);
45+
});
46+
}
47+
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"artifact": "binary",
3+
"category": "primary",
4+
"cargo_opts": "--bin server",
5+
"touch_file": "src/bin/server.rs"
6+
}

0 commit comments

Comments
 (0)