rust-lang / rust-lang/docs.rs

Show the memory usage and time to build a crate

Open
#878 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-builds E-medium P-low
Dominant language
Rust
Stars
1.2k
Forks
232
Avg merge
11h 35m
Merged PRs (30d)
60

Description

For crates which time out due to resource limits, there is very little indication of why: the logs show only 'process exited with signal SIGKILL'. It would be ideal to say why the process was killed and how much time and memory were used.

I wonder if docs.rs can use this same trick with /usr/bin/time -v?

$ cargo clean
$ /usr/bin/time -v cargo doc --no-deps -p termwiz
...
        Command being timed: "cargo doc --no-deps -p termwiz"
        User time (seconds): 90.74
        System time (seconds): 6.77
        Percent of CPU this job got: 456%
        Elapsed (wall clock) time (h:mm:ss or m:ss): 0:21.37
        Average shared text size (kbytes): 0
        Average unshared data size (kbytes): 0
        Average stack size (kbytes): 0
        Average total size (kbytes): 0
        Maximum resident set size (kbytes): 3810736
        Average resident set size (kbytes): 0
        Major (requiring I/O) page faults: 0
        Minor (reclaiming a frame) page faults: 2504493
        Voluntary context switches: 4301
        Involuntary context switches: 50046
        Swaps: 0
        File system inputs: 0
        File system outputs: 705048
        Socket messages sent: 0
        Socket messages received: 0
        Signals delivered: 0
        Page size (bytes): 4096
        Exit status: 0

Originally posted by @wez in https://github.com/rust-lang/docs.rs/issues/842#issuecomment-647137410

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how docs.rs runs crate documentation builds and records resource-limit failures, then assess whether /usr/bin/time -v can be used around cargo doc --no-deps. Done means build logs explain why a process was killed and report the build time and memory usage.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
backend, build-system
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.