MCPcopy Create free account
hub / github.com/git/git / app__chunk_command

Function app__chunk_command

t/helper/test-simple-ipc.c:69–85  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

67 */
68#define CHUNK_ROWS (10000)
69static int app__chunk_command(ipc_server_reply_cb *reply_cb,
70 struct ipc_server_reply_data *reply_data)
71{
72 struct strbuf buf = STRBUF_INIT;
73 int row;
74 int ret;
75
76 for (row = 0; row < CHUNK_ROWS; row++) {
77 strbuf_setlen(&buf, 0);
78 strbuf_addf(&buf, "big: %.75d\n", row);
79 ret = reply_cb(reply_data, buf.buf, buf.len);
80 }
81
82 strbuf_release(&buf);
83
84 return ret;
85}
86
87/*
88 * Slowly reply with a series of lines. This is to model an expensive to

Callers 1

test_app_cbFunction · 0.85

Calls 3

strbuf_setlenFunction · 0.85
strbuf_addfFunction · 0.85
strbuf_releaseFunction · 0.85

Tested by

no test coverage detected