зеркало из https://github.com/microsoft/TestWinRT.git
Add IVector benchmark (#59)
* Add IVector benchmark * Add boxing benchmarks (#58) * Add some benchmarks for IReference / nullable. * Add some more delegate benchmarks. * Fix merge error Co-authored-by: Manodasan Wignarajah <mawign@microsoft.com>
This commit is contained in:
Родитель
e6379fadee
Коммит
d448f7cf94
|
@ -91,12 +91,19 @@ namespace winrt::BenchmarkComponent::implementation
|
|||
{
|
||||
}
|
||||
|
||||
Windows::Foundation::Collections::IVector<winrt::hstring> createList()
|
||||
{
|
||||
std::vector<winrt::hstring> list;
|
||||
return winrt::single_threaded_vector(std::move(list));
|
||||
}
|
||||
|
||||
ClassWithMarshalingRoutines::ClassWithMarshalingRoutines()
|
||||
{
|
||||
keyValuePairObject = createKeyValuePairObject();
|
||||
arrayObject = createArrayObject();
|
||||
nullableObject = createNullableObject();
|
||||
dictionary = createDictionary();
|
||||
list = createList();
|
||||
}
|
||||
|
||||
hstring ClassWithMarshalingRoutines::DefaultStringProperty()
|
||||
|
@ -138,6 +145,11 @@ namespace winrt::BenchmarkComponent::implementation
|
|||
{
|
||||
return dictionary;
|
||||
}
|
||||
|
||||
Windows::Foundation::Collections::IVector<winrt::hstring> ClassWithMarshalingRoutines::NewList()
|
||||
{
|
||||
return createList();
|
||||
}
|
||||
|
||||
Windows::Foundation::IInspectable ClassWithMarshalingRoutines::NewTypeErasedKeyValuePairObject()
|
||||
{
|
||||
|
|
|
@ -53,6 +53,7 @@ namespace winrt::BenchmarkComponent::implementation
|
|||
Windows::Foundation::IReference<INT32> nullableObject;
|
||||
Windows::Foundation::IReferenceArray<int> arrayObject;
|
||||
Windows::Foundation::Collections::IMap<hstring, BenchmarkComponent::WrappedClass> dictionary;
|
||||
Windows::Foundation::Collections::IVector<winrt::hstring> list;
|
||||
|
||||
Windows::Foundation::Collections::IKeyValuePair<hstring, IInspectable> createKeyValuePairObject();
|
||||
Windows::Foundation::IReference<INT32> createNullableObject();
|
||||
|
@ -92,6 +93,8 @@ namespace winrt::BenchmarkComponent::implementation
|
|||
BenchmarkComponent::WrappedClass NewWrappedClassObject();
|
||||
void NewWrappedClassObject(BenchmarkComponent::WrappedClass val);
|
||||
|
||||
Windows::Foundation::Collections::IVector<winrt::hstring> NewList();
|
||||
|
||||
int32_t IntProperty();
|
||||
void IntProperty(int32_t value);
|
||||
winrt::event_token IntPropertyChanged(Windows::Foundation::EventHandler<int32_t> const& handler);
|
||||
|
|
|
@ -90,6 +90,7 @@ namespace BenchmarkComponent
|
|||
void CallForInt(ProvideInt provideInt);
|
||||
|
||||
Windows.Foundation.Collections.IMap<String, WrappedClass> ExistingDictionary{ get; };
|
||||
Windows.Foundation.Collections.IVector<String> NewList();
|
||||
|
||||
Windows.Foundation.IReference<Int32> NullableInt{ get; set; };
|
||||
Windows.Foundation.IReference<BlittableStruct> NullableBlittableStruct{ get; set; };
|
||||
|
|
Загрузка…
Ссылка в новой задаче