Skip to content

Commit

Permalink
Report asset names in loading trace events. (#6713)
Browse files Browse the repository at this point in the history
  • Loading branch information
rmacnak-google authored Nov 1, 2018
1 parent d06ace6 commit fbb7893
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion assets/asset_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ std::unique_ptr<fml::Mapping> AssetManager::GetAsMapping(
if (asset_name.size() == 0) {
return nullptr;
}
TRACE_EVENT0("flutter", "AssetManager::GetAsMapping");
TRACE_EVENT1("flutter", "AssetManager::GetAsMapping", "name",
asset_name.c_str());
for (const auto& resolver : resolvers_) {
auto mapping = resolver->GetAsMapping(asset_name);
if (mapping != nullptr) {
Expand Down
3 changes: 2 additions & 1 deletion assets/zip_asset_store.cc
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ bool ZipAssetStore::IsValid() const {
// |blink::AssetResolver|
std::unique_ptr<fml::Mapping> ZipAssetStore::GetAsMapping(
const std::string& asset_name) const {
TRACE_EVENT0("flutter", "ZipAssetStore::GetAsMapping");
TRACE_EVENT1("flutter", "ZipAssetStore::GetAsMapping", "name",
asset_name.c_str());
auto found = stat_cache_.find(asset_name);

if (found == stat_cache_.end()) {
Expand Down

0 comments on commit fbb7893

Please sign in to comment.