mirror of
				https://github.com/NotAShelf/microfetch.git
				synced 2025-11-04 07:32:20 +00:00 
			
		
		
		
	perf: use nix::sys::utsname::uname for less syscalls
Instead of reading multiple files to get the `sysname`, `release`, and `machine` name, use the `nix::sys::utsname::uname` function which sends a single uname syscall instead. This increases performance and portability. From my observations, there are ~10 less syscalls.
This commit is contained in:
		
					parent
					
						
							
								17152f9d14
							
						
					
				
			
			
				commit
				
					
						e398582d53
					
				
			
		
					 2 changed files with 10 additions and 25 deletions
				
			
		| 
						 | 
				
			
			@ -4,7 +4,7 @@ version = "0.3.3"
 | 
			
		|||
edition = "2021"
 | 
			
		||||
 | 
			
		||||
[dependencies]
 | 
			
		||||
nix = {version = "0.29", features = ["fs", "hostname"]}
 | 
			
		||||
nix = { version = "0.29", features = ["fs", "hostname", "feature"] }
 | 
			
		||||
color-eyre = { version = "0.6", default-features = false }
 | 
			
		||||
 | 
			
		||||
[profile.dev]
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue