Skip to content

Commit

Permalink
Refactor: reorganize functions in internal/profile to clarify the pub…
Browse files Browse the repository at this point in the history
…lic api (#264)
  • Loading branch information
danielsn committed Sep 27, 2023
1 parent 0407e5c commit ad54c79
Show file tree
Hide file tree
Showing 4 changed files with 253 additions and 242 deletions.
2 changes: 1 addition & 1 deletion profiling-ffi/src/profiles.rs
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ unsafe fn ddog_prof_profile_add_impl(
) -> anyhow::Result<()> {
let profile = profile_ptr_to_inner(profile_ptr)?;

match sample.try_into().map(|s| profile.add(s, timestamp)) {
match sample.try_into().map(|s| profile.add_sample(s, timestamp)) {
Ok(r) => match r {
Ok(_) => Ok(()),
Err(err) => Err(err),
Expand Down
2 changes: 1 addition & 1 deletion profiling-replayer/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ fn main() -> anyhow::Result<()> {

let before = Instant::now();
for (timestamp, sample) in samples {
outprof.add(sample, timestamp)?;
outprof.add_sample(sample, timestamp)?;
}
let duration = before.elapsed();

Expand Down
2 changes: 1 addition & 1 deletion profiling/examples/profiles.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ fn main() {
// Intentionally use the current time.
let mut profile = Profile::new(SystemTime::now(), &sample_types, Some(period));

match profile.add(sample, None) {
match profile.add_sample(sample, None) {
Ok(_) => {}
Err(_) => exit(1),
}
Expand Down
Loading

0 comments on commit ad54c79

Please sign in to comment.