Skip to content

Commit 5ea63e7

Browse files
authored
Remove perf feature of OpenSK (#930)
It only works in debug mode. Instead we rely on external measurements (e.g. using tcpdump with usbmon). It is enough to measure GetInfo so no need to bypass user interaction.
1 parent d4aa30f commit 5ea63e7

File tree

3 files changed

+0
-19
lines changed

3 files changed

+0
-19
lines changed

examples/rust/opensk/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ debug = ["opensk-lib/debug_ctap"]
3939
ed25519 = ["opensk-lib/ed25519", "wasefire/api-crypto-ed25519"]
4040
fingerprint = ["dep:wasefire-common", "opensk-lib/fingerprint", "wasefire/api-fingerprint-matcher"]
4141
led-1 = []
42-
perf = []
4342
test = ["opensk-lib/std", "wasefire/test"]
4443

4544
[lints]

examples/rust/opensk/src/lib.rs

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -30,23 +30,6 @@ mod env;
3030
mod touch;
3131

3232
fn main() -> ! {
33-
#[cfg(feature = "perf")]
34-
{
35-
struct Us(u64);
36-
impl core::fmt::Display for Us {
37-
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
38-
write!(f, "{}.{:06}", self.0 / 1_000_000, self.0 % 1_000_000)
39-
}
40-
}
41-
let prev = core::cell::Cell::new(debug::perf());
42-
let timer = timer::Timer::new(move || {
43-
let next = debug::perf();
44-
let diff = next - prev.replace(next);
45-
debug!("Perf: P={} A={} W={}", Us(diff.platform), Us(diff.applets), Us(diff.waiting));
46-
});
47-
timer.start_ms(timer::Periodic, 5_000);
48-
timer.leak()
49-
}
5033
let mut opensk_ctap = opensk_lib::Ctap::new(env::init());
5134
let mut wink: Option<blink::Blink> = None;
5235
#[cfg(feature = "ctap1")]

examples/rust/opensk/test.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,4 @@ cargo check --lib --target=wasm32-unknown-unknown --features=debug
2525
cargo check --lib --target=wasm32-unknown-unknown --features=ed25519
2626
cargo check --lib --target=wasm32-unknown-unknown --features=fingerprint
2727
cargo check --lib --target=wasm32-unknown-unknown --features=led-1
28-
cargo check --lib --target=wasm32-unknown-unknown --features=perf
2928
cargo test --lib --features=test

0 commit comments

Comments
 (0)