!sBfrWMVsLoSyFTCkNv:nixos.org

OfBorg

167 Members
Number of builds and evals in queue: <TBD>62 Servers

Load older messages


SenderMessageTime
4 May 2023
@raitobezarius:matrix.orgraitobezarius Right now, what I'm doing is that I am adding touched_modules to track nixos/activation: ... or stuff like that 20:57:15
@raitobezarius:matrix.orgraitobezariusthen transform touched modules into a proper list of affected modules ideally20:57:25
@raitobezarius:matrix.orgraitobezariusby checking also the changed paths20:57:31
@raitobezarius:matrix.orgraitobezariusthe most annoying thing though is it's unclear I can do ./test-pr $pr-number and run the whole nixpkgs eval logic on it without setting everything20:58:05
@raitobezarius:matrix.orgraitobezarius I'm wondering how hackable a thin wrapper to create this test-pr would require given the presence of a full fledged AMQP broker in this thing 20:58:22
@raitobezarius:matrix.orgraitobezariusthe code is full of easter eggs21:00:22
@raitobezarius:matrix.orgraitobezarius
    // FIXME: remove with rust/cargo update
    #[allow(clippy::cognitive_complexity)]
21:01:58
@raitobezarius:matrix.orgraitobezariusI wonder if the easiest thing is to extract the logic that makes sense in a general way into a separate crate and test it then rewire it in ofborg21:03:09
@hexa:lossy.networkhexa raitobezarius: you did see the call that was posted into the related issue? 21:38:18
@hexa:lossy.networkhexa

nix-instantiate --eval '<nixpkgs/nixos>' --arg configuration '{}' -A config.meta.maintainers --strict --json

21:38:35
@raitobezarius:matrix.orgraitobezarius Yeah I know about nix-instantiate --eval '<nixpkgs/nixos>' --arg configuration '{}' -A config.meta.maintainers --strict --json 21:38:50
@hexa:lossy.networkhexaok, just making sure21:38:58
@raitobezarius:matrix.orgraitobezariusI'm trying to understand the options21:39:07
@raitobezarius:matrix.orgraitobezariusClearly, if I had a way to relate changed paths with those paths in the JSON, it would be easy win21:39:25
@raitobezarius:matrix.orgraitobezariusBut I think it's a good idea to try to be proper about it21:40:17
@raitobezarius:matrix.orgraitobezariusnow that I talked enough I have an idea to do it purely in Nix maybe21:46:46
@raitobezarius:matrix.orgraitobezariusah but your technique cannot recover the name of the module21:54:32
@raitobezarius:matrix.orgraitobezariusalso I don't think we store the name of modules anywhere anyway21:54:38
@raitobezarius:matrix.orgraitobezariushttps://github.com/NixOS/ofborg/pull/641 here's a wip22:09:05
@raitobezarius:matrix.orgraitobezariussome stuff might need to be fixed but I think the strategy should work22:09:30
@raitobezarius:matrix.orgraitobezariusinterested into some feedback though before going too far22:10:21
@raitobezarius:matrix.orgraitobezarius
In reply to @raitobezarius:matrix.org
also I don't think we store the name of modules anywhere anyway
(I can derive it via string ops on filenames)
22:11:39
@cole-h:matrix.orgcole-h Having to evaluate NixOS seems like it would add a lot of overheard to the evaluation times. Maybe you could look at how it would change that before going too far.
ofborg/src/nixstats.rs and ofborg/src/outpathdiff.rs might have some hints on how that information is generated.
22:12:11
@raitobezarius:matrix.orgraitobezariusevaluating NixOS with an empty module set I believe is extremely fast?22:12:44
@raitobezarius:matrix.orgraitobezarius * evaluating NixOS with an empty configuration I believe is extremely fast?22:12:51
@cole-h:matrix.orgcole-hI'd be happier with empirical evidence :P22:13:05
@raitobezarius:matrix.orgraitobezarius
❯ hyperfine "nix-instantiate --eval '<nixpkgs/nixos>' --arg configuration '{}' -A config.meta.maintainers --strict --json" 
Benchmark 1: nix-instantiate --eval '<nixpkgs/nixos>' --arg configuration '{}' -A config.meta.maintainers --strict --json
  Time (mean ± σ):     621.8 ms ±  22.6 ms    [User: 524.8 ms, System: 91.2 ms]
  Range (min … max):   597.3 ms … 663.9 ms    10 runs
22:13:59
@raitobezarius:matrix.orgraitobezarius
{
  "cpuTime": 0.49957001209259033,
  "envs": {
    "bytes": 12506824,
    "elements": 609381,
    "number": 476986
  },
  "gc": {
    "heapSize": 402915328,
    "totalBytes": 87726480
  },
  "list": {
    "bytes": 1933232,
    "concats": 13049,
    "elements": 241654
  },
  "nrAvoided": 488806,
  "nrFunctionCalls": 412021,
  "nrLookups": 240540,
  "nrOpUpdateValuesCopied": 1193821,
  "nrOpUpdates": 12482,
  "nrPrimOpCalls": 244606,
  "nrThunks": 691079,
  "sets": {
    "bytes": 29699424,
    "elements": 1702651,
    "number": 153563
  },
  "sizes": {
    "Attr": 16,
    "Bindings": 16,
    "Env": 16,
    "Value": 24
  },
  "symbols": {
    "bytes": 531386,
    "number": 45882
  },
  "values": {
    "bytes": 27441768,
    "number": 1143407
  }
}
22:14:20
@raitobezarius:matrix.orgraitobezariusfor the nix show stats22:14:23
@cole-h:matrix.orgcole-hCool22:14:35

Show newer messages


Back to Room ListRoom Version: 6