move the parallel-compression setting to binary-cache-store, the setting
can be done now from the url e.g s3://nix-cache?parallel-compression=1 instead of nix.conf.
This commit is contained in:
		
							parent
							
								
									55ecdfe2a8
								
							
						
					
					
						commit
						47ad88099b
					
				
					 3 changed files with 3 additions and 4 deletions
				
			
		|  | @ -149,7 +149,7 @@ void BinaryCacheStore::addToStore(const ValidPathInfo & info, const ref<std::str | ||||||
|     /* Compress the NAR. */ |     /* Compress the NAR. */ | ||||||
|     narInfo->compression = compression; |     narInfo->compression = compression; | ||||||
|     auto now1 = std::chrono::steady_clock::now(); |     auto now1 = std::chrono::steady_clock::now(); | ||||||
|     auto narCompressed = compress(compression, *nar, settings.parallelCompression); |     auto narCompressed = compress(compression, *nar, parallelCompression); | ||||||
|     auto now2 = std::chrono::steady_clock::now(); |     auto now2 = std::chrono::steady_clock::now(); | ||||||
|     narInfo->fileHash = hashString(htSHA256, *narCompressed); |     narInfo->fileHash = hashString(htSHA256, *narCompressed); | ||||||
|     narInfo->fileSize = narCompressed->size(); |     narInfo->fileSize = narCompressed->size(); | ||||||
|  |  | ||||||
|  | @ -19,6 +19,8 @@ public: | ||||||
|     const Setting<bool> writeNARListing{this, false, "write-nar-listing", "whether to write a JSON file listing the files in each NAR"}; |     const Setting<bool> writeNARListing{this, false, "write-nar-listing", "whether to write a JSON file listing the files in each NAR"}; | ||||||
|     const Setting<Path> secretKeyFile{this, "", "secret-key", "path to secret key used to sign the binary cache"}; |     const Setting<Path> secretKeyFile{this, "", "secret-key", "path to secret key used to sign the binary cache"}; | ||||||
|     const Setting<Path> localNarCache{this, "", "local-nar-cache", "path to a local cache of NARs"}; |     const Setting<Path> localNarCache{this, "", "local-nar-cache", "path to a local cache of NARs"}; | ||||||
|  |     const Setting<bool> parallelCompression{this, false, "parallel-compression", | ||||||
|  |         "enable multi-threading compression, available for xz only currently"}; | ||||||
| 
 | 
 | ||||||
| private: | private: | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -174,9 +174,6 @@ public: | ||||||
|         "Whether to compress logs.", |         "Whether to compress logs.", | ||||||
|         {"build-compress-log"}}; |         {"build-compress-log"}}; | ||||||
| 
 | 
 | ||||||
|     Setting<bool> parallelCompression{this, false, "parallel-compression", |  | ||||||
|         "Whether to enable parallel compression, only supported with xz currently"}; |  | ||||||
| 
 |  | ||||||
|     Setting<unsigned long> maxLogSize{this, 0, "max-build-log-size", |     Setting<unsigned long> maxLogSize{this, 0, "max-build-log-size", | ||||||
|         "Maximum number of bytes a builder can write to stdout/stderr " |         "Maximum number of bytes a builder can write to stdout/stderr " | ||||||
|         "before being killed (0 means no limit).", |         "before being killed (0 means no limit).", | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue