MCPcopy Create free account
hub / github.com/apache/trafficserver / write_transaction_to_disk

Method write_transaction_to_disk

plugins/traffic_dump/session_data.cc:358–376  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

356}
357
358int
359SessionData::write_transaction_to_disk(std::string_view content)
360{
361 const std::lock_guard<std::recursive_mutex> _(disk_io_mutex);
362
363 int result = TS_SUCCESS;
364 if (has_written_first_transaction) {
365 // Prepend a comma.
366 std::string with_comma;
367 with_comma.reserve(content.size() + 1);
368 with_comma.push_back(',');
369 with_comma.append(content);
370 result = write_to_disk_no_lock(with_comma);
371 } else {
372 result = write_to_disk_no_lock(content);
373 has_written_first_transaction = true;
374 }
375 return result;
376}
377
378std::string
379SessionData::get_http_version_in_client_stack() const

Callers 1

Calls 4

reserveMethod · 0.45
sizeMethod · 0.45
push_backMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected