@@ -147,8 +147,16 @@ MethodSpec procMethod(GDSMode gdsMode) {
147147 .addMember ("value" , "$S" , "configuration" )
148148 .addMember ("defaultValue" , "$S" , "{}" )
149149 .build ())
150- .build ())
151- .addStatement ("var specification = new $T()" , typeNames .specification (gdsMode ))
150+ .build ());
151+
152+ if (deprecatedBy .isPresent ()) {
153+ methodBuilder .addStatement (
154+ "executionContext().metricsFacade().deprecatedProcedures().called($S)" ,
155+ fullProcedureName
156+ );
157+ }
158+
159+ methodBuilder .addStatement ("var specification = new $T()" , typeNames .specification (gdsMode ))
152160 .addStatement ("var executor = new $T<>(specification, executionContext())" , ProcedureExecutor .class )
153161 .addStatement ("return executor.compute(graphName, configuration)" );
154162 return methodBuilder .build ();
@@ -186,8 +194,16 @@ MethodSpec procEstimateMethod(GDSMode gdsMode) {
186194 .addAnnotation (AnnotationSpec .builder (Description .class )
187195 .addMember ("value" , "$T.ESTIMATE_DESCRIPTION" , BaseProc .class )
188196 .build ()
189- )
190- .addStatement ("var specification = new $T()" , typeNames .specification (gdsMode ))
197+ );
198+
199+ if (deprecatedBy .isPresent ()) {
200+ methodBuilder .addStatement (
201+ "executionContext().metricsFacade().deprecatedProcedures().called($S)" ,
202+ fullProcedureName
203+ );
204+ }
205+
206+ methodBuilder .addStatement ("var specification = new $T()" , typeNames .specification (gdsMode ))
191207 .addStatement ("var executor = new $T<>(specification, executionContext(), transactionContext())" , MemoryEstimationExecutor .class )
192208 .addStatement ("return executor.computeEstimate(graphNameOrConfiguration, algoConfiguration)" );
193209 return methodBuilder .build ();
0 commit comments