We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 048883e + c57ef2e commit de3edc5Copy full SHA for de3edc5
analyzeme/src/profiling_data.rs
@@ -52,6 +52,17 @@ impl ProfilingData {
52
fs::read(paths.string_index_file).expect("couldn't read string_index file");
53
let event_data = fs::read(paths.events_file).expect("couldn't read events file");
54
55
+ ProfilingData::from_buffers(string_data, index_data, event_data)
56
+ }
57
+
58
+ pub fn from_buffers(
59
+ string_data: Vec<u8>,
60
+ string_index: Vec<u8>,
61
+ events: Vec<u8>,
62
+ ) -> Result<ProfilingData, Box<dyn Error>> {
63
+ let index_data = string_index;
64
+ let event_data = events;
65
66
let event_data_format = read_file_header(&event_data, FILE_MAGIC_EVENT_STREAM)?;
67
if event_data_format != CURRENT_FILE_FORMAT_VERSION {
68
Err(format!(
0 commit comments