Microsoft Azure PlayFab logo
    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Add-ons
    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA
  • Runs on PlayFab
  • Pricing
    • Blog
    • Forums
    • Contact us
  • Sign up
  • Sign in
  • Ask a question
  • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges
  • Home /
  • API and SDK Questions /
avatar image
Question by Kim Strasser · Jan 10, 2021 at 09:13 PM · PlayStream

Where can I find the size of my PlayStream events?

In this example, they use 10 counts and 20 KB size for player_executed_cloudscript to calculate the average size of PlayStream events. But I don't know how to get the size of my PlayStream events.

https://docs.microsoft.com/en-us/gaming/playfab/features/pricing/meters/meters#example

In my case, should I use 15240(MemoryConsumedBytes) for PlayStream event size or is 15240 not the size of this PlayStream event?

My event data:

{
    "PlayFabEnvironment": {
        "Application": "logicserver",
        "Vertical": "master",
        "Commit": "e077f68",
        "Cloud": "main"
    },
    "EventNamespace": "com.playfab",
    "SourceType": "BackEnd",
    "EntityType": "player",
    "EventName": "player_executed_cloudscript",
    "Timestamp": "2021-01-08T12:52:41.2343997Z",
    "FunctionName": "GetPlayerAvatar",
    "CloudScriptExecutionResult": {
        "FunctionName": "GetPlayerAvatar",
        "ExecutionTimeSeconds": 0.0235788,
        "ProcessorTimeSeconds": 0,
        "MemoryConsumedBytes": 15240,
        "HttpRequestsIssued": 0,
        "Revision": 111,
        "APIRequestsIssued": 1,
        "FunctionResult": {
            "callsuccessful": true,
            "avatarnumber": "6",
            "errorresult": null
        },
        "Logs": [
            {
                "Message": "avatar code is: 6",
                "Level": "Info"
            }
        ]
    },
    "EntityId": "4BA00A0BDD80CDE6",
    "EventId": "294997f600a94667aab477f2ef20f011",
    "Source": "CloudScript",
    "TitleId": "E5E2C"
}
Comment

People who like this

0 Show 0
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
Best Answer

Answer by SethDu · Jan 11, 2021 at 08:33 AM

According to the official documentation: Pricing Meters - PlayFab | Microsoft Docs, it is stated that the size of the event is uncompressed and only includes the payload. You may use a string counter tool to measure the size of the above payload. However, PlayFab only counts the total size of the PlayStream Event within a month in the billing summary, the size of a single event is not statistically useful.

The document means that “10 counts and 20 KB size” will be eventually listed in the billing page as “20 counts” for your payment reference.

Comment

People who like this

0 Show 2 · Share
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Kim Strasser · Jan 11, 2021 at 01:14 PM 0
Share

What exactly is the payload in my example? Is it every character (from line 1. to line 38.) that is in my event data?

Is it necessary to include the names like "PlayFabEnvironment", "Application", "Vertical" in the calculations to measure the size of the payload?

However, PlayFab only counts the total size of the PlayStream Event within a month in the billing summary, the size of a single event is not statistically useful.

I'm not sure if my calculations for the total size of an event are correct.

For example: The event player_executed_cloudscript gets executed 5 times in one month.

1. execution: payload size = 0,30 KB

2. execution: payload size = 0,35 KB

3. execution: payload size = 0,28 KB

4. execution: payload size = 0,36 KB

5. execution: payload size = 0,29 KB

Counts = 5 Total size = 1,58 KB

Is the total size for player_executed_cloudscript event in this example 1,58 KB or is the total size of an event calculated differently?

avatar image SethDu ♦ Kim Strasser · Jan 13, 2021 at 02:32 AM 0
Share

The payload size in the previous context should be around 1,096 bytes, but it can be slightly different based on some whitespace characters.

Total Size is simply adding up each event's payload size, while the Counts, which is eventually displayed in billing summary, is calculated to be an effective count.

Hence the example you have mentioned -- 5 counts for 1.58KB, will be 5 * 1.58 = 7.9 counts in the billing summary as it is stated in the Example Section of Pricing Meters - PlayFab | Microsoft Docs.

If you want to know more details about the billing metering, you can navigate to this Contact page or email the sales team for help.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Navigation

Spaces
  • General Discussion
  • API and SDK Questions
  • Feature Requests
  • PlayStream
  • Bugs
  • Add-on Marketplace
  • LiveOps
  • Follow this Question

    Answers Answers and Comments

    3 People are following this question.

    avatar image avatar image avatar image

    Related Questions

    How to use "Namespace" of GetPlayerTags 1 Answer

    Changing Stats from multiple Players 1 Answer

    Cloudscript request arguments in playstream 1 Answer

    CloudScript: How can I mark suspicious players? 1 Answer

    How long until a task executed on a specific player 1 Answer

    PlayFab

    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Runs on PlayFab
    • Pricing

    Solutions

    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA

    Engineers

    • Documentation
    • Quickstarts
    • API Reference
    • SDKs
    • Usage Limits

    Resources

    • Forums
    • Contact us
    • Blog
    • Service Health
    • Terms of Service
    • Attribution

    Follow us

    • Facebook
    • Twitter
    • LinkedIn
    • YouTube
    • Sitemap
    • Contact Microsoft
    • Privacy & cookies
    • Terms of use
    • Trademarks
    • Safety & eco
    • About our ads
    • © Microsoft 2020
    • Anonymous
    • Sign in
    • Create
    • Ask a question
    • Create an article
    • Post an idea
    • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Explore
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges