Skip to content

Commit

Permalink
Merge pull request #9160 from brs96/add-model-store-load-metrics
Browse files Browse the repository at this point in the history
Add datadog metric for model store and load
  • Loading branch information
brs96 authored Jun 6, 2024
2 parents cafbb59 + d017934 commit 87f09a7
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,8 @@
public interface ModelCatalogListener {

void onInsert(Model<?, ?, ?> model);

void onStore(Model<?, ?, ?> model);

void onLoad();
}
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,22 @@ void shouldStoreModelsPerType() {
@Test
void shouldNotifyListeners() {
var counter = new Counter();
modelCatalog.registerListener(model -> counter.increment());
modelCatalog.registerListener(new ModelCatalogListener() {
@Override
public void onInsert(Model<?, ?, ?> model) {
counter.increment();
}

@Override
public void onStore(Model<?, ?, ?> model) {

}

@Override
public void onLoad() {

}
});

var model = Model.of(
"testAlgo",
Expand Down

0 comments on commit 87f09a7

Please sign in to comment.