This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const std = @import("std"); | |
const OUT_FILE = "out.bin"; | |
const BUFFER_SIZE: u64 = 4096; | |
fn readNBytes( | |
allocator: *const std.mem.Allocator, | |
filename: []const u8, | |
n: usize, | |
) ![]const u8 { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const std = @import("std"); | |
fn Stack(comptime T: type) type { | |
return struct { | |
const Node = struct { | |
value: T, | |
next: ?*Node, | |
}; | |
const Self = @This(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Buffers; | |
string serverUrl = "http://localhost:2305"; | |
int numRequests = 100000; | |
int concurrency = 100; | |
using HttpClient client = new(); | |
using var semaphore = new SemaphoreSlim(concurrency); | |
var tasks = new Task[numRequests]; |